1+ name : Build binaries
2+ on :
3+ push :
4+ tags :
5+ - " v*.*.*"
6+ branches :
7+ - msweep-release-testing
8+
9+ jobs :
10+ build_linux-x86_64 :
11+ runs-on : ubuntu-latest
12+ container : phusion/holy-build-box-64:3.0.2
13+ steps :
14+ - name : Install wget
15+ id : install-wget
16+ run : yum install -y wget
17+
18+ - name : Create io directory
19+ id : mkdir-io
20+ run : mkdir /io && cd /io
21+
22+ - name : Download build script
23+ id : dl-build-script
24+ run : wget https://raw.githubusercontent.com/tmaklin/biobins/master/linux/mSWEEP/build.sh
25+
26+ - name : Compile binary in Holy Build Box container
27+ id : compile-in-container
28+ run : chmod +x build.sh && ./build.sh ${{ github.ref_name }}
29+
30+ - name : Upload linux-x86_64 binary
31+ if : success()
32+ uses : actions/upload-artifact@v3
33+ with :
34+ name : mSWEEP-${{ github.ref_name }}-x86_64-redhat-linux
35+ path : /io/mSWEEP-${{ github.ref_name }}-x86_64-redhat-linux.tar.gz
36+
37+ build_macOS-x86_64 :
38+ runs-on : ubuntu-latest
39+ container : ghcr.io/shepherdjerred/macos-cross-compiler:latest
40+ steps :
41+ - name : Install wget
42+ id : install-wget
43+ run : apt install -y wget
44+
45+ - name : Create io directory
46+ id : mkdir-io
47+ run : mkdir /io && cd /io
48+
49+ - name : Download toolchain file
50+ id : dl-toolchain-file
51+ run : wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/x86-64-toolchain.cmake && cp x86-64-toolchain.cmake /io/x86-64-toolchain.cmake && cp x86-64-toolchain.cmake /x86-64-toolchain.cmake
52+
53+ - name : Download build script
54+ id : dl-build-script
55+ run : wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/mSWEEP/build.sh
56+
57+ - name : Compile binary in macOS Cross Compiler container
58+ id : compile-in-container
59+ run : chmod +x build.sh && ./build.sh ${{ github.ref_name }} x86-64
60+
61+ - name : Upload macOS-x86_64 binary
62+ if : success()
63+ uses : actions/upload-artifact@v3
64+ with :
65+ name : mSWEEP-${{ github.ref_name }}-x86_64-apple-darwin22
66+ path : /io/mSWEEP-${{ github.ref_name }}-x86_64-apple-darwin22.tar.gz
67+
68+ build_macOS-arm64 :
69+ runs-on : ubuntu-latest
70+ container : ghcr.io/shepherdjerred/macos-cross-compiler:latest
71+ steps :
72+ - name : Install wget
73+ id : install-wget
74+ run : apt install -y wget
75+
76+ - name : Create io directory
77+ id : mkdir-io
78+ run : mkdir /io && cd /io
79+
80+ - name : Download toolchain file
81+ id : dl-toolchain-file
82+ run : wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/arm64-toolchain.cmake && cp arm64-toolchain.cmake /io/arm64-toolchain.cmake && cp arm64-toolchain.cmake /arm64-toolchain.cmake
83+
84+ - name : Download build script
85+ id : dl-build-script
86+ run : wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/mSWEEP/build.sh
87+
88+ - name : Compile binary in macOS Cross Compiler container
89+ id : compile-in-container
90+ run : chmod +x build.sh && ./build.sh ${{ github.ref_name }} arm64
91+
92+ - name : Upload macOS-arm64 binary
93+ if : success()
94+ uses : actions/upload-artifact@v3
95+ with :
96+ name : mSWEEP-${{ github.ref_name }}-arm64-apple-darwin22
97+ path : /io/mSWEEP-${{ github.ref_name }}-arm64-apple-darwin22.tar.gz
98+
99+ create-release :
100+ runs-on : ubuntu-latest
101+
102+ needs : [ build_linux-x86_64, build_macOS-x86_64, build_macOS-arm64 ]
103+
104+ steps :
105+ - uses : actions/checkout@v2
106+
107+ - uses : actions/download-artifact@v2
108+ with :
109+ path : build
110+
111+ - name : Organise files
112+ shell : bash
113+ run : |
114+ cp build/mSWEEP-${{ github.ref_name }}-arm64-apple-darwin22/mSWEEP-${{ github.ref_name }}-arm64-apple-darwin22.tar.gz .
115+ cp build/mSWEEP-${{ github.ref_name }}-x86_64-apple-darwin22/mSWEEP-${{ github.ref_name }}-x86_64-apple-darwin22.tar.gz .
116+ cp build/mSWEEP-${{ github.ref_name }}-x86_64-redhat-linux/mSWEEP-${{ github.ref_name }}-x86_64-redhat-linux.tar.gz .
117+
118+ - name : Create release
119+ id : create_release
120+ uses : softprops/action-gh-release@v1
121+ with :
122+ name : Release ${{ github.ref_name }}
123+ draft : false
124+ prerelease : false
125+ fail_on_unmatched_files : true
126+ generate_release_notes : true
127+ files : |
128+ mSWEEP-*.tar.gz
0 commit comments