1313 - dev
1414
1515env :
16- Bin : ./bin/release # Where to put release binaries
17- HashDir : ./hash # Where to put hashes of binaries
18- DepsDir : ./deps # Where to put local libs (primarily for Windows builds)
16+ Bin : ./bin/release # Where to put release binaries
17+ HashDir : ./hash # Where to put hashes of binaries
18+ DepsDir : ./deps # Where to put local libs (primarily for Windows builds)
1919
2020jobs :
21-
2221 binary :
2322 strategy :
2423 matrix :
2524 include :
25+ # Release builds
2626
27- # Release builds
28-
29- # astroterm-linux-x86_64
27+ # astroterm-linux-x86_64
3028 - os : ubuntu-22.04
3129 suffix : linux
3230 compiler : gcc
3937 arch : aarch64
4038
4139 # astroterm-darwin-x86_64
42- - os : macos-13
40+ - os : macos-15-intel
4341 suffix : darwin
4442 compiler : clang
4543 arch : x86_64
@@ -108,7 +106,7 @@ jobs:
108106 # macOS Dependencies
109107 # ------------------------------------------------------------------------
110108
111- # Use argtable2 since argtable3 is only available as a dylib
109+ # Use argtable2 since argtable3 is only available as a dylib
112110 - name : Install macOS Dependencies
113111 if : matrix.suffix == 'darwin'
114112 run : |
@@ -127,7 +125,7 @@ jobs:
127125 if : matrix.suffix == 'win'
128126 uses : actions/setup-python@v2
129127 with :
130- python-version : ' 3.x'
128+ python-version : " 3.x"
131129
132130 - name : Install Python Dependencies
133131 if : matrix.suffix == 'win'
@@ -188,7 +186,7 @@ jobs:
188186 - name : Build
189187 env :
190188 CC : ${{ matrix.compiler }}
191- BuildFlags : ${{ matrix.coverage && '-Db_coverage=true' || '--buildtype=release -Dprefer_static=true'}}
189+ BuildFlags : ${{ matrix.coverage && '-Db_coverage=true' || '--buildtype=release -Dprefer_static=true'}}
192190 run : |
193191 meson setup build ${{ env.BuildFlags }}
194192 meson compile --verbose -C build
@@ -220,16 +218,16 @@ jobs:
220218
221219 - name : Generate Hash
222220 run : |
223- mkdir -p ${{ env.HashDir }}
224- ${{ matrix.suffix == 'win' && 'certutil -hashfile build/astroterm.exe SHA256' || 'shasum -a 256 build/astroterm' }} > ${{ env.HashDir }}/${{ env.BinaryName }}.sha256
221+ mkdir -p ${{ env.HashDir }}
222+ ${{ matrix.suffix == 'win' && 'certutil -hashfile build/astroterm.exe SHA256' || 'shasum -a 256 build/astroterm' }} > ${{ env.HashDir }}/${{ env.BinaryName }}.sha256
225223
226224 - name : Upload Hash
227225 if : ${{ !matrix.coverage && !matrix.ascii }}
228226 uses : actions/upload-artifact@v4
229227 with :
230- name : ${{ env.BinaryName }}.sha256
231- path : ${{ env.HashDir }}/*
232- if-no-files-found : error
228+ name : ${{ env.BinaryName }}.sha256
229+ path : ${{ env.HashDir }}/*
230+ if-no-files-found : error
233231
234232 # ------------------------------------------------------------------------
235233 # Upload Binary
@@ -238,25 +236,24 @@ jobs:
238236 - name : Rename Binary File
239237 if : ${{ !matrix.coverage && !matrix.ascii }}
240238 run : |
241- mkdir -p ${{env.Bin}}
242- mv ${{ matrix.suffix == 'win' && 'build/astroterm.exe' || 'build/astroterm' }} ${{env.Bin}}/${{env.BinaryName}}
239+ mkdir -p ${{env.Bin}}
240+ mv ${{ matrix.suffix == 'win' && 'build/astroterm.exe' || 'build/astroterm' }} ${{env.Bin}}/${{env.BinaryName}}
243241
244242 - name : Upload Binary
245243 if : ${{ !matrix.coverage && !matrix.ascii }}
246244 uses : actions/upload-artifact@v4
247245 with :
248- name : ${{ env.BinaryName }}
249- path : ${{env.Bin}}
250- if-no-files-found : error
246+ name : ${{ env.BinaryName }}
247+ path : ${{env.Bin}}
248+ if-no-files-found : error
251249
252250 # Ensure binaries are standalone
253251 run :
254252 needs : binary
255253 strategy :
256254 matrix :
257255 include :
258-
259- # astroterm-linux-x86_64
256+ # astroterm-linux-x86_64
260257 - os : ubuntu-22.04
261258 suffix : linux
262259 arch : x86_64
@@ -267,7 +264,7 @@ jobs:
267264 arch : aarch64
268265
269266 # astroterm-darwin-x86_64
270- - os : macos-13
267+ - os : macos-15-intel
271268 suffix : darwin
272269 arch : x86_64
273270
@@ -282,72 +279,72 @@ jobs:
282279 BinaryName : ${{ matrix.suffix == 'win' && format('astroterm-{0}-{1}.exe', matrix.suffix, matrix.arch) || format('astroterm-{0}-{1}', matrix.suffix, matrix.arch)}}
283280
284281 steps :
285- - name : Checkout Code
286- uses : actions/checkout@v4
282+ - name : Checkout Code
283+ uses : actions/checkout@v4
287284
288- - name : Download Release Binary
289- uses : actions/download-artifact@v4
290- with :
291- pattern : ${{ env.BinaryName }}*
292- path : ${{env.Bin}}
293- merge-multiple : true
285+ - name : Download Release Binary
286+ uses : actions/download-artifact@v4
287+ with :
288+ pattern : ${{ env.BinaryName }}*
289+ path : ${{env.Bin}}
290+ merge-multiple : true
294291
295- - name : List Release Directory
296- run : |
297- ls -l ${{env.Bin}}
292+ - name : List Release Directory
293+ run : |
294+ ls -l ${{env.Bin}}
298295
299- - name : Set Executable Permissions
300- if : matrix.suffix != 'win'
301- run : |
302- chmod +x ${{env.Bin}}/${{ env.BinaryName }}
296+ - name : Set Executable Permissions
297+ if : matrix.suffix != 'win'
298+ run : |
299+ chmod +x ${{env.Bin}}/${{ env.BinaryName }}
303300
304- - name : Run Binary
305- run : |
306- ${{env.Bin}}/${{ env.BinaryName }} -v
301+ - name : Run Binary
302+ run : |
303+ ${{env.Bin}}/${{ env.BinaryName }} -v
307304
308305 code-quality :
309306 runs-on : ubuntu-latest
310307 needs : run
311308 steps :
312- - name : Checkout Repository
313- uses : actions/checkout@v4
314-
315- - name : Install Code Quality Tools
316- run : |
317- sudo apt-get install -y cppcheck clang-format
318-
319- - name : Run Cppcheck
320- run : |
321- cppcheck \
322- --suppress=missingIncludeSystem \
323- --suppress=unusedFunction \
324- --suppress=missingInclude \
325- --suppress=style \
326- --error-exitcode=1 \
327- -i src/strptime.c \
328- -I include \
329- src/
330-
331- - name : Check Formatting
332- run : |
333- sh ./scripts/format.sh --check
309+ - name : Checkout Repository
310+ uses : actions/checkout@v4
311+
312+ - name : Install Code Quality Tools
313+ run : |
314+ sudo apt-get install -y cppcheck clang-format
315+
316+ - name : Run Cppcheck
317+ run : |
318+ cppcheck \
319+ --suppress=missingIncludeSystem \
320+ --suppress=unusedFunction \
321+ --suppress=missingInclude \
322+ --suppress=style \
323+ --error-exitcode=1 \
324+ -i src/strptime.c \
325+ -I include \
326+ src/
327+
328+ - name : Check Formatting
329+ run : |
330+ sh ./scripts/format.sh --check
334331
335332 upload-coverage :
336333 runs-on : ubuntu-latest
337334 needs : code-quality
338335 steps :
339- - name : Download Coverage Reports
340- uses : actions/download-artifact@v4
341- with :
342- name : coverage
343- path : coverage
344-
345- - name : Upload Coverage to Codecov
346- uses : codecov/codecov-action@v5
347- with :
348- token : ${{ secrets.CODECOV_TOKEN }}
349- files : coverage/coverage.xml
350- fail_ci_if_error : true
336+ - name : Download Coverage Reports
337+ uses : actions/download-artifact@v4
338+ with :
339+ name : coverage
340+ path : coverage
341+
342+ - name : Upload Coverage to Codecov
343+ uses : codecov/codecov-action@v5
344+ with :
345+ token : ${{ secrets.CODECOV_TOKEN }}
346+ files : coverage/coverage.xml
347+ fail_ci_if_error : true
351348
352349 publish-release :
353350 runs-on : ubuntu-latest
@@ -356,47 +353,45 @@ jobs:
356353 contents : write
357354 if : github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
358355 steps :
356+ - name : Download Release Binaries
357+ uses : actions/download-artifact@v4
358+ with :
359+ pattern : astroterm-*
360+ path : ${{env.Bin}}
361+ merge-multiple : true
362+
363+ - name : Verify Version Consistency
364+ run : |
365+ TAG_VERSION="${{ github.ref_name }}"
366+ BINARY_PATH="${{env.Bin}}/astroterm-linux-x86_64"
359367
360- - name : Download Release Binaries
361- uses : actions/download-artifact@v4
362- with :
363- pattern : astroterm-*
364- path : ${{env.Bin}}
365- merge-multiple : true
366-
367- - name : Verify Version Consistency
368- run : |
369- TAG_VERSION="${{ github.ref_name }}"
370- BINARY_PATH="${{env.Bin}}/astroterm-linux-x86_64"
371-
372- # Ensure the binary is executable
373- chmod +x "$BINARY_PATH"
374-
375- # Extract version from binary output
376- BINARY_VERSION=$($BINARY_PATH -v | awk '{print $2}')
377-
378- # Remove the "v" prefix if present
379- if [[ "$TAG_VERSION" == v* ]]; then
380- TAG_VERSION=${TAG_VERSION:1}
381- fi
382-
383- # Compare the two versions
384- if [ "$TAG_VERSION" != "$BINARY_VERSION" ]; then
385- echo "Error: Git tag version ($TAG_VERSION) does not match binary version ($BINARY_VERSION)."
386- exit 1
387- fi
388-
389- echo "Success: Git tag version ($TAG_VERSION) matches binary version ($BINARY_VERSION)."
390-
391-
392- - name : List files in release folder
393- run : ls -al ${{env.Bin}}
394-
395- - name : Update GitHub Release
396- uses : ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37 # v1.10.0
397- with :
398- artifacts : ${{env.Bin}}/*
399- generateReleaseNotes : true
400- draft : true
401- token : ${{ secrets.GITHUB_TOKEN }}
402- name : ${{ github.ref_name }}
368+ # Ensure the binary is executable
369+ chmod +x "$BINARY_PATH"
370+
371+ # Extract version from binary output
372+ BINARY_VERSION=$($BINARY_PATH -v | awk '{print $2}')
373+
374+ # Remove the "v" prefix if present
375+ if [[ "$TAG_VERSION" == v* ]]; then
376+ TAG_VERSION=${TAG_VERSION:1}
377+ fi
378+
379+ # Compare the two versions
380+ if [ "$TAG_VERSION" != "$BINARY_VERSION" ]; then
381+ echo "Error: Git tag version ($TAG_VERSION) does not match binary version ($BINARY_VERSION)."
382+ exit 1
383+ fi
384+
385+ echo "Success: Git tag version ($TAG_VERSION) matches binary version ($BINARY_VERSION)."
386+
387+ - name : List files in release folder
388+ run : ls -al ${{env.Bin}}
389+
390+ - name : Update GitHub Release
391+ uses : ncipollo/release-action@58ae73b360456532aafd58ee170c045abbeaee37 # v1.10.0
392+ with :
393+ artifacts : ${{env.Bin}}/*
394+ generateReleaseNotes : true
395+ draft : true
396+ token : ${{ secrets.GITHUB_TOKEN }}
397+ name : ${{ github.ref_name }}
0 commit comments