-
Notifications
You must be signed in to change notification settings - Fork 0
171 lines (146 loc) · 5.95 KB
/
make_release.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: Build binaries
on:
push:
tags:
- "v*.*.*"
branches:
- alignment-writer-release-testing
jobs:
build_linux-x86_64:
runs-on: ubuntu-latest
container: phusion/holy-build-box-64:3.0.2
steps:
- name: Install dependencies
id: install-dependencies
shell: bash
run: |
yum install -y git
- name: Create io directories
id: mkdir-io
run: |
mkdir /io
cd /io
mkdir tmp
cd tmp
- name: Clone source tree
id: run-git-clone
run: |
git clone https://github.com/tmaklin/alignment-writer
cd alignment-writer
git checkout ${{ github.ref_name }}
- name: Configure source build
id: run-cmake
run: |
source /hbb_exe/activate
export LDFLAGS="-L/lib64 -static-libstdc++"
rm --force /hbb/bin/git
ln -s /usr/bin/git /hbb/bin/git
cd /io/tmp/alignment-writer
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS="-march=x86-64 -mtune=generic -m64" -DCMAKE_C_FLAGS="-march=x86-64 -mtune=generic -m64" -DCMAKE_WITH_FLTO=1 -DCMAKE_WITH_NATIVE_INSTRUCTIONS=OFF ..
- name: Compile Linux x86_64 binary
id: run-make
run: |
cd /io/tmp/alignment-writer/build
source /hbb_exe/activate
export LDFLAGS="-L/lib64 -static-libstdc++"
rm --force /hbb/bin/git
ln -s /usr/bin/git /hbb/bin/git
make VERBOSE=1 -j
- name: Create distributable archive
id: gather-stuff
run: |
cd /io/tmp/alignment-writer/build
target=alignment-writer-${{ github.ref_name }}}-$(gcc -v 2>&1 | grep "^Target" | cut -f2 -d':' | sed 's/[[:space:]]*//g')
path=/io/tmp/$target
mkdir $path
cp ../build/bin/alignment-writer $path/
cp ../README.md $path/
cp ../LICENSE $path/
cd /io/tmp
tar -zcvf $target.tar.gz $target
mv $target.tar.gz /io/
cd /io/
rm -rf tmp cache
- name: Upload linux-x86_64 binary
if: success()
uses: actions/upload-artifact@v3
with:
name: themisto-${{ github.ref_name }}-x86_64-redhat-linux
path: /io/themisto-${{ github.ref_name }}-x86_64-redhat-linux.tar.gz
## build_macOS-x86_64:
## runs-on: ubuntu-latest
## container: ghcr.io/shepherdjerred/macos-cross-compiler:latest
## steps:
## - name: Install wget
## id: install-wget
## run: apt install -y wget
## - name: Create io directory
## id: mkdir-io
## run: mkdir /io && cd /io
## - name: Download x86_64 toolchain file
## id: dl-toolchain-file
## run: wget https://raw.githubusercontent.com/algbio/themisto/${{ github.ref_name }}/deploy/macOS/x86-64-toolchain_GNU.cmake && cp x86-64-toolchain_GNU.cmake /io/x86-64-toolchain_GNU.cmake && cp x86-64-toolchain_GNU.cmake /x86-64-toolchain_GNU.cmake
## - name: Download build script
## id: dl-build-script
## run: wget https://raw.githubusercontent.com/algbio/themisto/${{ github.ref_name }}/deploy/macOS/build.sh
## - name: Compile binary in macOS Cross Compiler container
## id: compile-in-container
## run: chmod +x build.sh && ./build.sh ${{ github.ref_name }} x86-64
## - name: Upload macOS-x86_64 binary
## if: success()
## uses: actions/upload-artifact@v3
## with:
## name: themisto-${{ github.ref_name }}-x86_64-apple-darwin22
## path: /io/themisto-${{ github.ref_name }}-x86_64-apple-darwin22.tar.gz
## build_macOS-arm64:
## runs-on: ubuntu-latest
## container: ghcr.io/shepherdjerred/macos-cross-compiler:latest
## steps:
## - name: Install wget
## id: install-wget
## run: apt install -y wget
## - name: Create io directory
## id: mkdir-io
## run: mkdir /io && cd /io
## - name: Download arm64 toolchain file
## id: dl-toolchain-file
## run: wget https://raw.githubusercontent.com/algbio/themisto/${{ github.ref_name }}/deploy/macOS/arm64-toolchain_GNU.cmake && cp arm64-toolchain_GNU.cmake /io/arm64-toolchain_GNU.cmake && cp arm64-toolchain_GNU.cmake /arm64-toolchain_GNU.cmake
## - name: Download build script
## id: dl-build-script
## run: wget https://raw.githubusercontent.com/algbio/themisto/${{ github.ref_name }}/deploy/macOS/build.sh
## - name: Compile binary in macOS Cross Compiler container
## id: compile-in-container
## run: chmod +x build.sh && ./build.sh ${{ github.ref_name }} arm64
## - name: Upload macOS-arm64 binary
## if: success()
## uses: actions/upload-artifact@v3
## with:
## name: themisto-${{ github.ref_name }}-aarch64-apple-darwin22
## path: /io/themisto-${{ github.ref_name }}-aarch64-apple-darwin22.tar.gz
create-release:
runs-on: ubuntu-latest
needs: [ build_linux-x86_64 ] ##, build_macOS-x86_64, build_macOS-arm64 ]
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
path: build
- name: Organise files
shell: bash
run: |
## cp build/themisto-${{ github.ref_name }}-aarch64-apple-darwin22/themisto-${{ github.ref_name }}-aarch64-apple-darwin22.tar.gz .
## cp build/themisto-${{ github.ref_name }}-x86_64-apple-darwin22/themisto-${{ github.ref_name }}-x86_64-apple-darwin22.tar.gz .
cp build/themisto-${{ github.ref_name }}-x86_64-redhat-linux/themisto-${{ github.ref_name }}-x86_64-redhat-linux.tar.gz .
- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
fail_on_unmatched_files: true
generate_release_notes: true
files: |
themisto-*.tar.gz