23
23
# Oldest supported gcc and cmake versions
24
24
- gcc-version : 9
25
25
cmake-version : 3.14.7
26
+ upload : false
26
27
# Latest supported gcc and cmake versions
27
28
- gcc-version : 12
28
29
cmake-version : latest
30
+ upload : true
29
31
30
32
steps :
31
33
- name : Checkout
@@ -47,38 +49,48 @@ jobs:
47
49
run : |
48
50
mkdir build
49
51
cd build
50
- cmake .. -DCMAKE_C_COMPILER=$(which gcc-${{ matrix.gcc-version }}) -DCMAKE_CXX_COMPILER=$(which g++-${{ matrix.gcc-version }})
52
+ cmake .. -DIQTREE_FLAGS=static - DCMAKE_C_COMPILER=$(which gcc-${{ matrix.gcc-version }}) -DCMAKE_CXX_COMPILER=$(which g++-${{ matrix.gcc-version }})
51
53
make -j
52
54
file iqtree2 | grep x86-64
53
55
54
- # build-linux-aarch64:
55
- # name: Linux aarch64
56
- # runs-on: ubuntu-latest
57
- #
58
- # steps:
59
- # - name: Checkout
60
- # uses: actions/checkout@v4
61
- # with:
62
- # submodules: "recursive"
63
- #
64
- # - name: Build on Linux ARM64
65
- # uses: uraimo/run-on-arch-action@v2
66
- # with:
67
- # arch: aarch64
68
- # distro: ubuntu_latest
69
- # githubToken: ${{ github.token }}
70
- # dockerRunArgs: |
71
- # --volume "${PWD}:/iqtree2"
72
- # install: |
73
- # apt-get update -q -y
74
- # apt-get install -q -y cmake gcc g++ file libeigen3-dev libboost-dev
75
- # run: |
76
- # cd /iqtree2
77
- # mkdir build
78
- # cd build
79
- # cmake ..
80
- # make -j
81
- # file iqtree2 | grep aarch64
56
+ - name : Upload Built Binary
57
+ # Only upload for one of the gcc & cmake tests
58
+ if : ${{ matrix.upload }}
59
+ uses : actions/upload-artifact@v4
60
+ with :
61
+ name : Linux x86-64
62
+ path : build/iqtree2
63
+ if-no-files-found : error
64
+
65
+ build-linux-aarch64 :
66
+ name : Linux aarch64
67
+ runs-on : ubuntu-22.04-arm
68
+
69
+ steps :
70
+ - name : Checkout
71
+ uses : actions/checkout@v4
72
+ with :
73
+ submodules : " recursive"
74
+
75
+ - name : Install dependencies
76
+ run : |
77
+ sudo apt-get update -q -y
78
+ sudo apt-get install -q -y gcc g++ libeigen3-dev libboost-dev
79
+
80
+ - name : Build
81
+ run : |
82
+ mkdir build
83
+ cd build
84
+ cmake .. -DIQTREE_FLAGS=static
85
+ make -j
86
+ file iqtree2 | grep aarch64
87
+
88
+ - name : Upload Built Binary
89
+ uses : actions/upload-artifact@v4
90
+ with :
91
+ name : Linux AArch64
92
+ path : build/iqtree2
93
+ if-no-files-found : error
82
94
83
95
build-macos-x86_64 :
84
96
name : Mac OS x86-64
@@ -104,6 +116,13 @@ jobs:
104
116
cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
105
117
gmake -j
106
118
file iqtree2 | grep x86_64
119
+
120
+ - name : Upload Built Binary
121
+ uses : actions/upload-artifact@v4
122
+ with :
123
+ name : Mac x86-64
124
+ path : build/iqtree2
125
+ if-no-files-found : error
107
126
108
127
build-macos-arm :
109
128
name : Mac OS ARM64
@@ -130,6 +149,39 @@ jobs:
130
149
gmake -j
131
150
file iqtree2 | grep arm64
132
151
152
+ - name : Upload Built Binary
153
+ uses : actions/upload-artifact@v4
154
+ with :
155
+ name : Mac Arm
156
+ path : build/iqtree2
157
+ if-no-files-found : error
158
+
159
+ compile-mac-universal :
160
+ name : Mac OS Universal
161
+ runs-on : macos-14
162
+ needs :
163
+ - build-macos-x86_64
164
+ - build-macos-arm
165
+
166
+ steps :
167
+ - name : Download Artifacts
168
+ uses : actions/download-artifact@v4
169
+ with :
170
+ pattern : Mac *
171
+
172
+ - name : Combine Artifacts
173
+ run : lipo -create -output iqtree2 "Mac x86-64/iqtree2" "Mac Arm/iqtree2"
174
+
175
+ - name : Check Architectures
176
+ run : lipo -archs iqtree2
177
+
178
+ - name : Upload Built Binary
179
+ uses : actions/upload-artifact@v4
180
+ with :
181
+ name : Mac Universal
182
+ path : iqtree2
183
+ if-no-files-found : error
184
+
133
185
build-windows-x86-64 :
134
186
name : Windows x86-64
135
187
runs-on : windows-2022
@@ -179,3 +231,10 @@ jobs:
179
231
run : |
180
232
cd build
181
233
file iqtree2.exe | grep x86-64
234
+
235
+ - name : Upload Built Binary
236
+ uses : actions/upload-artifact@v4
237
+ with :
238
+ name : Windows x86-64
239
+ path : build/iqtree2.exe
240
+ if-no-files-found : error
0 commit comments