@@ -10,7 +10,39 @@ permissions:
10
10
contents : write
11
11
12
12
jobs :
13
+ build-musl-binaries :
14
+ strategy :
15
+ matrix :
16
+ include :
17
+ - target : x86_64-unknown-linux-musl
18
+ runner : ubuntu-24.04
19
+ - target : aarch64-unknown-linux-musl
20
+ runner : codspeedhq-arm64-ubuntu-24.04
21
+
22
+ runs-on : ${{ matrix.runner }}
23
+ steps :
24
+ - uses : actions/checkout@v4
25
+ with :
26
+ submodules : true
27
+ fetch-depth : 0
28
+ - uses : moonrepo/setup-rust@v1
29
+ with :
30
+ targets : ${{ matrix.target }}
31
+
32
+ - name : Install musl tools
33
+ run : sudo apt-get update && sudo apt-get install -y musl-tools
34
+
35
+ - run : cargo build --locked --release --bin cargo-codspeed --target ${{ matrix.target }}
36
+
37
+ - name : Upload binary as artifact
38
+ uses : actions/upload-artifact@v4
39
+ with :
40
+ name : cargo-codspeed-${{ matrix.target }}
41
+ path : ./target/${{ matrix.target }}/release/cargo-codspeed
42
+ if-no-files-found : error
43
+
13
44
publish :
45
+ needs : build-musl-binaries
14
46
runs-on : ubuntu-latest
15
47
steps :
16
48
- uses : actions/checkout@v4
@@ -41,35 +73,25 @@ jobs:
41
73
outputs :
42
74
upload_url : ${{ steps.create_release.outputs.upload_url }}
43
75
44
- build- upload-binaries :
76
+ upload-binaries :
45
77
needs : publish
46
78
strategy :
47
79
fail-fast : false
48
80
matrix :
49
- include :
50
- - target : x86_64-unknown-linux-musl
51
- runner : ubuntu-24.04
52
- - target : aarch64-unknown-linux-musl
53
- runner : codspeedhq-arm64-ubuntu-24.04
81
+ target :
82
+ - x86_64-unknown-linux-musl
83
+ - aarch64-unknown-linux-musl
54
84
55
- runs-on : ${{ matrix.runner }}
85
+ runs-on : ubuntu-latest
56
86
steps :
57
- - uses : actions/checkout@v4
87
+ - name : Download binary artifact
88
+ uses : actions/download-artifact@v4
58
89
with :
59
- submodules : true
60
- fetch-depth : 0
61
- - uses : moonrepo/setup-rust@v1
62
- with :
63
- targets : ${{ matrix.target }}
64
-
65
- - name : Install musl tools
66
- run : sudo apt-get update && sudo apt-get install -y musl-tools
67
-
68
- - run : cargo build --locked --release --bin cargo-codspeed --target ${{ matrix.target }}
90
+ name : cargo-codspeed-${{ matrix.target }}
91
+ path : ./target/${{ matrix.target }}/release
69
92
70
93
- name : Upload Release Asset
71
94
if : github.event_name != 'workflow_dispatch'
72
- id : upload-release-asset
73
95
uses : actions/upload-release-asset@v1
74
96
env :
75
97
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments