Skip to content

Commit 9954715

Browse files
authored
Added Windows CD steps. (#3)
* test windows * install depencies * fix depencies * fix msys2 * try msys2 step * add generic64 build step * fix ms build step * add msbuild actiın * fix msbuild step * add other build * fix build step * fix avx and avx512 step * fix lang * add adadas dad * add windows cd steps * add tag deploy for windows,add depencies create release * fix windows artifact directory * add windows artifact for release * generic64 artifact name change * fix zip directory name for win artifact * fix windows header directory * add headers of windows artifacts
1 parent 96c6514 commit 9954715

File tree

2 files changed

+58
-5
lines changed

2 files changed

+58
-5
lines changed
Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,51 @@
1-
name: CD
1+
name: release
22
on: [push, pull_request]
33
jobs:
4+
windows:
5+
name: windows
6+
runs-on: windows-latest
7+
if: startsWith(github.ref, 'refs/tags/')
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: msys2/setup-msys2@v2
11+
- name: Install Depencies
12+
run: |
13+
msys2 -c 'pacman -S --noconfirm libxslt base-devel mingw-w64-x86_64-clang'
14+
- name: Add msbuild to PATH
15+
uses: microsoft/setup-msbuild@v1.0.2
16+
- name: Build Generic64
17+
shell: msys2 {0}
18+
run: |
19+
CFLAGS="-O3 -g0 -march=ivybridge -mtune=native" ASMFLAGS="-march=ivybridge -mtune=native" make generic64/libXKCP.so
20+
- name: Build SSSE3
21+
shell: msys2 {0}
22+
run: |
23+
CFLAGS="-O3 -g0 -march=corei7 -mtune=native" ASMFLAGS="-march=corei7 -mtune=native" make SSSE3/libXKCP.so
24+
- name: Build AVX2
25+
shell: msys2 {0}
26+
run: |
27+
CFLAGS="-O3 -g0 -march=skylake -mtune=native" ASMFLAGS="-march=skylake -mtune=native" make AVX2/libXKCP.so
28+
- name: Build AVX512
29+
shell: msys2 {0}
30+
run: |
31+
CFLAGS="-O3 -g0 -march=skylake-avx512 -mtune=native" ASMFLAGS="-march=skylake-avx512 -mtune=native" make AVX512/libXKCP.so
32+
- name: Change Artifact Name
33+
run: |
34+
mkdir bin/artifacts
35+
mv bin/AVX2/libXKCP.so bin/artifacts/XKCP-AVX2.dll
36+
mv bin/AVX512/libXKCP.so bin/artifacts/XKCP-AVX512.dll
37+
mv bin/SSSE3/libXKCP.so bin/artifacts/XKCP-SSSE3.dll
38+
mv bin/generic64/libXKCP.so bin/artifacts/XKCP.dll
39+
mv bin/generic64/libXKCP.so.headers bin/artifacts/libXKCP-win.so.headers
40+
ls bin/artifacts
41+
42+
- name: Upload win Artifact
43+
uses: actions/upload-artifact@v2
44+
with:
45+
name: XKCP-win
46+
path: |
47+
bin/artifacts/*.dll
48+
bin/artifacts/libXKCP-win.so.headers
449
linux:
550
name: linux
651
if: startsWith(github.ref, 'refs/tags/')
@@ -30,7 +75,7 @@ jobs:
3075
mv bin/AVX2/libXKCP.so bin/artifacts/libXKCP-AVX2.so
3176
mv bin/AVX512/libXKCP.so bin/artifacts/libXKCP-AVX512.so
3277
mv bin/SSSE3/libXKCP.so bin/artifacts/libXKCP-SSSE3.so
33-
mv bin/generic64/libXKCP.so bin/artifacts/libXKCP-generic64.so
78+
mv bin/generic64/libXKCP.so bin/artifacts/libXKCP.so
3479
mv bin/generic64/libXKCP.so.headers bin/artifacts/libXKCP-linux.so.headers
3580
ls bin/artifacts
3681
- name: Upload Linux Artifact
@@ -68,7 +113,7 @@ jobs:
68113
mv bin/AVX2/libXKCP.so bin/artifacts/libXKCP-AVX2.dylib
69114
mv bin/AVX512/libXKCP.so bin/artifacts/libXKCP-AVX512.dylib
70115
mv bin/SSSE3/libXKCP.so bin/artifacts/libXKCP-SSSE3.dylib
71-
mv bin/generic64/libXKCP.so bin/artifacts/libXKCP-generic64.dylib
116+
mv bin/generic64/libXKCP.so bin/artifacts/libXKCP.dylib
72117
mv bin/generic64/libXKCP.so.headers bin/artifacts/libXKCP-osx.so.headers
73118
ls bin/artifacts
74119
- name: Upload osx Artifact
@@ -81,7 +126,7 @@ jobs:
81126
create-release:
82127
runs-on: ubuntu-latest
83128
if: startsWith(github.ref, 'refs/tags/')
84-
needs: [linux,osx]
129+
needs: [linux,osx,windows]
85130
steps:
86131
- name: Download XKCP linux
87132
uses: actions/download-artifact@v2
@@ -93,13 +138,20 @@ jobs:
93138
uses: actions/download-artifact@v2
94139
with:
95140
name: XKCP-osx
96-
path: osx
141+
path: osx
142+
143+
- name: Download XKCP windows
144+
uses: actions/download-artifact@v2
145+
with:
146+
name: XKCP-win
147+
path: win
97148

98149
- name: Zip file
99150
run: |
100151
mkdir artifacts/
101152
tar czf artifacts/XKCP-linux.tar.gz -C linux/ $(find linux -type f -name "*.so" -exec basename {} \;) libXKCP-linux.so.headers/
102153
tar czf artifacts/XKCP-osx.tar.gz -C osx/ $(find osx -type f -name "*.dylib" -exec basename {} \;) libXKCP-osx.so.headers/
154+
tar czf artifacts/XKCP-win.tar.gz -C win/ $(find win -type f -name "*.dll" -exec basename {} \;) libXKCP-win.so.headers/
103155
- name: Release
104156
uses: softprops/action-gh-release@v1
105157
if: startsWith(github.ref, 'refs/tags/')

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
bin/
22
var/
3+
artifacts/

0 commit comments

Comments
 (0)