@@ -2,15 +2,94 @@ name: Create the nightly release
22on :
33 schedule :
44 # Take into account lut99's sleep schedule
5- cron : 0 4 * * *
5+ - cron : 0 4 * * *
66
77 # Manual mechanism to bump the nightly in case of a issue with the one from last night
88 workflow_dispatch :
99 inputs :
1010 ref :
1111 default : main
12- optional : true
12+ required : false
1313 type : string
1414
15+ # TODO: block concurrent execution
16+
1517jobs :
16- # TODO: Tag the last commit on main as nightly, but only if this is not the case already
18+ tag :
19+ name : " Add nightly tag"
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@v4
24+ with :
25+ ref : ${{ inputs.ref || 'main' }}
26+ fetch-tags : true
27+ - name : Check if there is anything to be done
28+ run : |
29+ [[ $(git rev-parse HEAD) != $(git rev-parse nightly) ]]
30+ - name : Tag the latest commit
31+ run : |
32+ git config user.name "Brane"
33+ git config user.email "[email protected] " 34+ git tag -a nightly
35+ git push --follow-tags
36+
37+ build :
38+ name : " Build & package"
39+ needs : tag
40+ strategy :
41+ fail-fast : false
42+ matrix :
43+ include :
44+ - runner : ubuntu-latest
45+ os : linux
46+ arch : x86_64
47+ - runner : macos-latest
48+ os : macos
49+ arch : aarch64
50+ # Don't support windows for now as that is complicated with the Makefile,
51+ # might add when there's an xtask for building on Windows.
52+ # - runner: windows-latest
53+ # os: windows
54+ # arch: x86_64
55+ - runner : ubuntu-24.04-arm
56+ os : linux
57+ arch : aarch64
58+ - runner : macos-13
59+ os : macos
60+ arch : x86_64
61+
62+ runs-on : ${{ matrix.runner }}
63+ steps :
64+ - name : Build
65+ run : |
66+ make all
67+ - name : Package
68+ run : |
69+ cargo run --release --package xtask package release
70+ - name : Upload
71+ uses : actions/upload-artifact@v4
72+ with :
73+ # TODO: add some unique identifier
74+ name : build-${{ matrix.os }}-${{ matrix.arch }}-nightly
75+ path : |
76+ target/package/release/*
77+ if-no-files-found : error
78+ retention-days : 1
79+
80+ release :
81+ name : " Release artifacts to GitHub"
82+ needs : build
83+ runs-on : ubuntu-latest
84+ steps :
85+ - name : Download artifacts
86+ uses : actions/download-artifact@v4
87+ # without further specification, downloads all artifacts from the run
88+ with :
89+ path : release
90+ - name : Release
91+ uses : softprops/action-gh-release@v2
92+ with :
93+ files : |
94+ release/*
95+ fail_on_unmatched_files : true
0 commit comments