forked from rhasspy/piper-phonemize
-
Notifications
You must be signed in to change notification settings - Fork 0
145 lines (145 loc) · 5.01 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: main
on:
workflow_dispatch:
push:
branches:
- master
tags:
- "*"
jobs:
# create_release:
# name: Create release
# runs-on: ubuntu-latest
# outputs:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# steps:
# - name: Create release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# tag_name: ${{ github.ref }}
# release_name: ${{ github.ref }}
# draft: false
# prerelease: false
build_linux:
name: "linux build"
runs-on: ubuntu-latest
# needs: create_release # we need to know the upload URL
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- name: build
run: |
docker buildx build . --platform linux/amd64,linux/arm64,linux/arm/v7 --output 'type=local,dest=dist'
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.arch }}
path: .
retention-days: 90 # max retention period
# - name: upload-amd64
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ needs.create_release.outputs.upload_url }}
# asset_path: dist/linux_amd64/piper-phonemize_amd64.tar.gz
# asset_name: piper-phonemize_linux_x86_64.tar.gz
# asset_content_type: application/octet-stream
# - name: upload-arm64
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ needs.create_release.outputs.upload_url }}
# asset_path: dist/linux_arm64/piper-phonemize_arm64.tar.gz
# asset_name: piper-phonemize_linux_aarch64.tar.gz
# asset_content_type: application/octet-stream
# - name: upload-armv7
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ needs.create_release.outputs.upload_url }}
# asset_path: dist/linux_arm_v7/piper-phonemize_armv7.tar.gz
# asset_name: piper-phonemize_linux_armv7l.tar.gz
# asset_content_type: application/octet-stream
build_windows:
runs-on: windows-latest
name: "windows build: ${{ matrix.arch }}"
# needs: create_release # we need to know the upload URL
strategy:
fail-fast: true
matrix:
arch: [x64]
steps:
- uses: actions/checkout@v3
- name: configure
run: |
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=_install/piper-phonemize
- name: build
run: |
cmake --build build --config Release
- name: install
run: |
cmake --install build
- name: package
run: |
cd _install
Compress-Archive -LiteralPath piper-phonemize -DestinationPath piper-phonemize_windows_amd64.zip
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.arch }}
path: .
retention-days: 90 # max retention period
# - name: upload
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ needs.create_release.outputs.upload_url }}
# asset_path: _install/piper-phonemize_windows_amd64.zip
# asset_name: piper-phonemize_windows_amd64.zip
# asset_content_type: application/zip
build_macos:
runs-on: macos-latest
name: "mac build: ${{ matrix.arch }}"
# needs: create_release # we need to know the upload URL
strategy:
fail-fast: true
matrix:
arch: [x64, aarch64]
steps:
- uses: actions/checkout@v3
- name: configure
run: |
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=_install/piper-phonemize
- name: build
run: |
cmake --build build --config Release
- name: install
run: |
cmake --install build
- name: package
run: |
cd _install && \
tar -czf piper-phonemize_macos_${{ matrix.arch }}.tar.gz piper-phonemize/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.arch }}
path: .
retention-days: 90 # max retention period
# - name: upload
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ needs.create_release.outputs.upload_url }}
# asset_path: _install/piper-phonemize_macos_${{ matrix.arch }}.tar.gz
# asset_name: piper-phonemize_macos_${{ matrix.arch }}.tar.gz
# asset_content_type: application/octet-stream