|
1 | | -name: Create Release |
| 1 | +name: Release |
| 2 | +concurrency: ci-${{ github.ref }} |
2 | 3 | on: |
3 | 4 | push: |
4 | 5 | tags: |
5 | | - - v* |
6 | | -jobs: |
7 | | - skip_check: |
8 | | - name: Skip Run Check |
9 | | - continue-on-error: true |
10 | | - runs-on: ubuntu-22.04 |
11 | | - outputs: |
12 | | - should_skip: ${{ steps.collate_checks.outputs.should_skip }} |
13 | | - steps: |
14 | | - - name: Print Release |
15 | | - id: force_ci_check |
16 | | - run: | |
17 | | - echo $release |
18 | | - env: |
19 | | - release: ${{ fromJson(github.event.release) }} |
20 | | - - name: Collate Checks |
21 | | - id: collate_checks |
22 | | - run: | |
23 | | - echo "::set-output name=should_skip::false" |
24 | | -
|
25 | | - build-win: |
26 | | - runs-on: windows-2022 |
27 | | - name: Build for Windows |
28 | | - needs: skip_check |
29 | | - if: needs.skip_check.outputs.should_skip != 'true' |
30 | | - steps: |
31 | | - - uses: actions/checkout@v3 |
32 | | - - name: Add msbuild to PATH |
33 | | - uses: microsoft/setup-msbuild@v1.1 |
34 | | - - name: Add Path Msys64 Directory |
35 | | - run: | |
36 | | - echo "c:\msys64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
37 | | - - name: Install msys2 dependencies |
38 | | - shell: msys2_shell.cmd -defterm -no-start -here -ucrt64 {0} |
39 | | - run: | |
40 | | - pacman -S --noconfirm ucrt64/mingw-w64-ucrt-x86_64-libxslt ucrt64/mingw-w64-ucrt-x86_64-make ucrt64/mingw-w64-ucrt-x86_64-gcc |
41 | | - ln -s /ucrt64/bin/mingw32-make.exe /ucrt64/bin/make.exe |
42 | | - echo GCC: $(which gcc) |
43 | | - echo MAKE: $(which make) |
44 | | - echo MSYSTEM: ${MSYSTEM} |
45 | | - - name: Build Generic64 |
46 | | - shell: msys2_shell.cmd -defterm -no-start -here -ucrt64 {0} |
47 | | - run: | |
48 | | - make generic64/libXKCP.so |
49 | | - env: |
50 | | - CFLAGS: -O3 -g0 -march=x86-64 -mtune=native |
51 | | - ASMFLAGS: -march=x86-64 -mtune=native |
52 | | - - name: Build SSSE3 |
53 | | - shell: msys2_shell.cmd -defterm -no-start -here -ucrt64 {0} |
54 | | - run: | |
55 | | - make SSSE3/libXKCP.so |
56 | | - env: |
57 | | - CFLAGS: -O3 -g0 -march=core2 -msse2 -mssse3 -mtune=native |
58 | | - ASMFLAGS: -march=core2 -mtune=native |
59 | | - - name: Build AVX2 |
60 | | - shell: msys2_shell.cmd -defterm -no-start -here -ucrt64 {0} |
61 | | - run: | |
62 | | - make AVX2/libXKCP.so |
63 | | - env: |
64 | | - CFLAGS: -O3 -g0 -march=skylake -mtune=native |
65 | | - ASMFLAGS: -march=skylake -mtune=native |
66 | | - - name: Build AVX512 |
67 | | - shell: msys2_shell.cmd -defterm -no-start -here -ucrt64 {0} |
68 | | - run: | |
69 | | - make AVX512/libXKCP.so |
70 | | - env: |
71 | | - CFLAGS: -O3 -g0 -march=skylake-avx512 -mtune=native |
72 | | - ASMFLAGS: -march=skylake-avx512 -mtune=native |
73 | | - |
74 | | - - name: Rename artifacts |
75 | | - run: | |
76 | | - mkdir bin/artifacts |
77 | | - mv bin/AVX2/libXKCP.so bin/artifacts/XKCP-AVX2.dll |
78 | | - mv bin/AVX512/libXKCP.so bin/artifacts/XKCP-AVX512.dll |
79 | | - mv bin/SSSE3/libXKCP.so bin/artifacts/XKCP-SSSE3.dll |
80 | | - mv bin/generic64/libXKCP.so bin/artifacts/XKCP.dll |
81 | | - mv bin/generic64/libXKCP.so.headers bin/artifacts/include |
82 | | - ls bin/artifacts |
83 | | - - name: Upload artifact |
84 | | - uses: actions/upload-artifact@v2 |
85 | | - with: |
86 | | - name: XKCP-win |
87 | | - path: | |
88 | | - bin/artifacts/*.dll |
89 | | - bin/artifacts/libXKCP-win.so.headers |
90 | | -
|
91 | | - build-linux: |
92 | | - name: Build for Linux |
93 | | - runs-on: ubuntu-latest |
94 | | - needs: skip_check |
95 | | - if: needs.skip_check.outputs.should_skip != 'true' |
96 | | - steps: |
97 | | - - uses: actions/checkout@v3 |
98 | | - - name: Install dependencies |
99 | | - run: | |
100 | | - sudo apt-get update && sudo apt-get install xsltproc -y |
101 | | -
|
102 | | - - name: Build Generic64 |
103 | | - run: | |
104 | | - CFLAGS="-O3 -g0 -march=x86-64 -mtune=native" ASMFLAGS="-march=x86-64 -mtune=native" make generic64/libXKCP.so |
105 | | - - name: Build SSSE3 |
106 | | - run: | |
107 | | - CFLAGS="-O3 -g0 -march=core2 -msse2 -mssse3 -mtune=native" ASMFLAGS="-march=core2 -mtune=native" make SSSE3/libXKCP.so |
108 | | - - name: Build AVX2 |
109 | | - run: | |
110 | | - CFLAGS="-O3 -g0 -march=skylake -mtune=native" ASMFLAGS="-march=skylake -mtune=native" make AVX2/libXKCP.so |
111 | | - - name: Build AVX512 |
112 | | - run: | |
113 | | - CFLAGS="-O3 -g0 -march=skylake-avx512 -mtune=native" ASMFLAGS="-march=skylake-avx512 -mtune=native" make AVX512/libXKCP.so |
114 | | - - name: Rename artifacts |
115 | | - run: | |
116 | | - mkdir bin/artifacts |
117 | | - mv bin/AVX2/libXKCP.so bin/artifacts/libXKCP-AVX2.so |
118 | | - mv bin/AVX512/libXKCP.so bin/artifacts/libXKCP-AVX512.so |
119 | | - mv bin/SSSE3/libXKCP.so bin/artifacts/libXKCP-SSSE3.so |
120 | | - mv bin/generic64/libXKCP.so bin/artifacts/libXKCP.so |
121 | | - mv bin/generic64/libXKCP.so.headers bin/artifacts/include |
122 | | - ls bin/artifacts |
123 | | - - name: Upload artifact |
124 | | - uses: actions/upload-artifact@v2 |
125 | | - with: |
126 | | - name: XKCP-linux |
127 | | - path: | |
128 | | - bin/artifacts/*.so |
129 | | - bin/artifacts/include |
130 | | -
|
131 | | - build-osx: |
132 | | - name: Build for Mac OSX |
133 | | - runs-on: macos-latest |
134 | | - needs: skip_check |
135 | | - if: needs.skip_check.outputs.should_skip != 'true' |
136 | | - steps: |
137 | | - - uses: actions/checkout@v3 |
138 | | - - name: Install dependencies |
139 | | - run: | |
140 | | - brew install libxslt |
141 | | - - name: Build for ARMv8A (M-series) |
142 | | - run: | |
143 | | - CFLAGS="-target aarch64-apple-darwin -arch arm64 -O3 -g0 -march=armv8-a" ASMFLAGS="-march=armv8-a" make ARMv8A/libXKCP.dylib |
144 | | - - name: Build Generic x86_64 |
145 | | - run: | |
146 | | - CFLAGS="-target x86_64-apple-darwin -arch x86_64 -O3 -g0 -march=x86-64 -mtune=native" ASMFLAGS="-march=x86-64 -mtune=native" make generic64/libXKCP.dylib |
147 | | - - name: Build SSSE3 |
148 | | - run: | |
149 | | - CFLAGS="-target x86_64-apple-darwin -arch x86_64 -O3 -g0 -march=core2 -msse2 -mssse3 -mtune=native" ASMFLAGS="-march=core2 -mtune=native" make SSSE3/libXKCP.dylib |
150 | | - - name: Build AVX2 |
151 | | - run: | |
152 | | - CFLAGS="-target x86_64-apple-darwin -arch x86_64 -O3 -g0 -march=skylake -mtune=native" ASMFLAGS="-march=skylake -mtune=native" make AVX2/libXKCP.dylib |
153 | | - - name: Build AVX512 |
154 | | - run: | |
155 | | - CFLAGS="-target x86_64-apple-darwin -arch x86_64 -O3 -g0 -march=skylake-avx512 -mtune=native" ASMFLAGS="-march=skylake-avx512 -mtune=native" make AVX512/libXKCP.dylib |
156 | | - - name: Rename and merge Generic64 and ARMv8A artifacts |
157 | | - run: | |
158 | | - mkdir bin/artifacts |
159 | | - mv bin/AVX2/libXKCP.dylib bin/artifacts/libXKCP-AVX2.dylib |
160 | | - mv bin/AVX512/libXKCP.dylib bin/artifacts/libXKCP-AVX512.dylib |
161 | | - mv bin/SSSE3/libXKCP.dylib bin/artifacts/libXKCP-SSSE3.dylib |
162 | | - lipo bin/generic64/libXKCP.dylib bin/ARMv8A/libXKCP.dylib -create -output bin/artifacts/libXKCP.dylib |
163 | | - mv bin/generic64/libXKCP.dylib.headers bin/artifacts/include |
164 | | - ls bin/artifacts |
165 | | - - name: Upload artifact |
166 | | - uses: actions/upload-artifact@v2 |
167 | | - with: |
168 | | - name: XKCP-osx |
169 | | - path: | |
170 | | - bin/artifacts/*.dylib |
171 | | - bin/artifacts/libXKCP-osx.dylib.headers |
| 6 | + - 'v[0-9]+.*' |
172 | 7 |
|
| 8 | +jobs: |
| 9 | + integration: |
| 10 | + name: Integration |
| 11 | + uses: ./.github/workflows/integrate.yml |
| 12 | + |
173 | 13 | create-release: |
174 | 14 | name: Create Release |
| 15 | + needs: integration |
175 | 16 | runs-on: ubuntu-latest |
176 | | - needs: [build-linux,build-osx,build-win] |
177 | 17 | steps: |
178 | 18 | - name: Download all XKCP artifacts |
179 | | - uses: actions/download-artifact@v2 |
| 19 | + uses: actions/download-artifact@v3 |
| 20 | + - name: Show files |
| 21 | + run: | |
| 22 | + ls -lR |
180 | 23 | - name: Repackage as release artifacts |
181 | 24 | run: | |
182 | 25 | mkdir artifacts/ |
183 | 26 | tar czf artifacts/XKCP-linux.tar.gz -C XKCP-linux/ $(find XKCP-linux -type f -name "*.so" -exec basename {} \;) |
184 | 27 | tar czf artifacts/XKCP-osx.tar.gz -C XKCP-osx/ $(find XKCP-osx -type f -name "*.dylib" -exec basename {} \;) |
185 | 28 | tar czf artifacts/XKCP-win.tar.gz -C XKCP-win/ $(find XKCP-win -type f -name "*.dll" -exec basename {} \;) |
186 | | - tar czf artifacts/XKCP-headers.tar.gz -C XKCP-linux/ XKCP-linux/include/ |
| 29 | + tar czf artifacts/XKCP-headers.tar.gz -C XKCP-linux/ include/ |
187 | 30 | - name: Create release on GitHub |
188 | | - uses: softprops/action-gh-release@v0.1.12 |
| 31 | + uses: softprops/action-gh-release@v0.1.14 |
189 | 32 | with: |
190 | 33 | name: XKCP |
191 | 34 | files: | |
|
0 commit comments