8
8
name : Build for Linux
9
9
runs-on : ubuntu-latest
10
10
steps :
11
- - uses : actions/checkout@v2
11
+ - uses : actions/checkout@v3
12
12
- if : ${{ github.event_name == 'push' }}
13
13
uses : azure/docker-login@v1
14
14
with :
25
25
26
26
# The artifact name will contain the target triple, so the file name doesn't need to.
27
27
mv artifacts/paxos-x86_64-unknown-linux-gnu artifacts/paxos
28
- - uses : actions/upload-artifact@v2
28
+ - uses : actions/upload-artifact@v3
29
29
with :
30
30
name : x86_64-unknown-linux-gnu
31
31
path : artifacts/paxos
36
36
37
37
# The artifact name will contain the target triple, so the file name doesn't need to.
38
38
mv artifacts/paxos-x86_64-unknown-linux-musl artifacts/paxos
39
- - uses : actions/upload-artifact@v2
39
+ - uses : actions/upload-artifact@v3
40
40
with :
41
41
name : x86_64-unknown-linux-musl
42
42
path : artifacts/paxos
47
47
48
48
# The artifact name will contain the target triple, so the file name doesn't need to.
49
49
mv artifacts/paxos-aarch64-unknown-linux-gnu artifacts/paxos
50
- - uses : actions/upload-artifact@v2
50
+ - uses : actions/upload-artifact@v3
51
51
with :
52
52
name : aarch64-unknown-linux-gnu
53
53
path : artifacts/paxos
58
58
59
59
# The artifact name will contain the target triple, so the file name doesn't need to.
60
60
mv artifacts/paxos-aarch64-unknown-linux-musl artifacts/paxos
61
- - uses : actions/upload-artifact@v2
61
+ - uses : actions/upload-artifact@v3
62
62
with :
63
63
name : aarch64-unknown-linux-musl
64
64
path : artifacts/paxos
67
67
name : Build for Windows
68
68
runs-on : windows-latest
69
69
steps :
70
- - uses : actions/checkout@v2
70
+ - uses : actions/checkout@v3
71
71
- run : |
72
72
# Make Bash not silently ignore errors.
73
73
set -euo pipefail
@@ -76,22 +76,38 @@ jobs:
76
76
rustup toolchain install 1.65.0 # [ref:rust_1.65.0]
77
77
rustup default 1.65.0 # [ref:rust_1.65.0]
78
78
79
- # Build and test.
79
+ # Add the targets.
80
+ rustup target add x86_64-pc-windows-msvc
81
+ rustup target add aarch64-pc-windows-msvc
82
+
83
+ # Build and test for x86_64-pc-windows-msvc.
80
84
RUSTFLAGS='--codegen target-feature=+crt-static' cargo build \
81
85
--locked \
82
86
--release \
83
87
--target x86_64-pc-windows-msvc
84
88
NO_COLOR=true cargo test --locked # [ref:colorless_tests]
85
- - uses : actions/upload-artifact@v2
89
+
90
+ # Build and test for aarch64-pc-windows-msvc.
91
+ RUSTFLAGS='--codegen target-feature=+crt-static' cargo build \
92
+ --locked \
93
+ --release \
94
+ --target aarch64-pc-windows-msvc
95
+ NO_COLOR=true cargo test --locked # [ref:colorless_tests]
96
+ - uses : actions/upload-artifact@v3
86
97
with :
87
98
name : x86_64-pc-windows-msvc
88
99
path : target/x86_64-pc-windows-msvc/release/paxos.exe
89
100
if-no-files-found : error
101
+ - uses : actions/upload-artifact@v3
102
+ with :
103
+ name : aarch64-pc-windows-msvc
104
+ path : target/aarch64-pc-windows-msvc/release/paxos.exe
105
+ if-no-files-found : error
90
106
ci-macos :
91
107
name : Build for macOS
92
108
runs-on : macos-latest
93
109
steps :
94
- - uses : actions/checkout@v2
110
+ - uses : actions/checkout@v3
95
111
- run : |
96
112
# Make Bash not silently ignore errors.
97
113
set -euo pipefail
@@ -100,22 +116,27 @@ jobs:
100
116
rustup toolchain install 1.65.0 # [ref:rust_1.65.0]
101
117
rustup default 1.65.0 # [ref:rust_1.65.0]
102
118
119
+ # Add the targets.
120
+ rustup target add x86_64-apple-darwin
121
+ rustup target add aarch64-apple-darwin
122
+
103
123
# Build and test for x86_64-apple-darwin.
104
- cargo build --locked --release --target x86_64-apple-darwin
124
+ SDKROOT=$(xcrun --show-sdk-path) \
125
+ MACOSX_DEPLOYMENT_TARGET=$(xcrun --show-sdk-version) \
126
+ cargo build --locked --release --target x86_64-apple-darwin
105
127
NO_COLOR=true cargo test --locked # [ref:colorless_tests]
106
128
107
129
# Build and test for aarch64-apple-darwin.
108
- rustup target add aarch64-apple-darwin
109
130
SDKROOT=$(xcrun --show-sdk-path) \
110
131
MACOSX_DEPLOYMENT_TARGET=$(xcrun --show-sdk-version) \
111
132
cargo build --locked --release --target aarch64-apple-darwin
112
133
NO_COLOR=true cargo test --locked # [ref:colorless_tests]
113
- - uses : actions/upload-artifact@v2
134
+ - uses : actions/upload-artifact@v3
114
135
with :
115
136
name : x86_64-apple-darwin
116
137
path : target/x86_64-apple-darwin/release/paxos
117
138
if-no-files-found : error
118
- - uses : actions/upload-artifact@v2
139
+ - uses : actions/upload-artifact@v3
119
140
with :
120
141
name : aarch64-apple-darwin
121
142
path : target/aarch64-apple-darwin/release/paxos
@@ -124,7 +145,7 @@ jobs:
124
145
name : Install on macOS
125
146
runs-on : macos-latest
126
147
steps :
127
- - uses : actions/checkout@v2
148
+ - uses : actions/checkout@v3
128
149
- run : |
129
150
# Make Bash not silently ignore errors.
130
151
set -euo pipefail
@@ -138,7 +159,7 @@ jobs:
138
159
name : Install on Ubuntu
139
160
runs-on : ubuntu-latest
140
161
steps :
141
- - uses : actions/checkout@v2
162
+ - uses : actions/checkout@v3
142
163
- run : |
143
164
# Make Bash not silently ignore errors.
144
165
set -euo pipefail
@@ -154,8 +175,8 @@ jobs:
154
175
runs-on : ubuntu-latest
155
176
needs : [ci-linux, ci-macos, ci-windows, install-macos, install-ubuntu]
156
177
steps :
157
- - uses : actions/checkout@v2
158
- - uses : actions/download-artifact@v2
178
+ - uses : actions/checkout@v3
179
+ - uses : actions/download-artifact@v3
159
180
with :
160
181
path : artifacts/
161
182
- env :
@@ -199,6 +220,9 @@ jobs:
199
220
mv \
200
221
artifacts/x86_64-pc-windows-msvc/paxos.exe \
201
222
artifacts/paxos-x86_64-pc-windows-msvc.exe
223
+ mv \
224
+ artifacts/aarch64-pc-windows-msvc/paxos.exe \
225
+ artifacts/paxos-aarch64-pc-windows-msvc.exe
202
226
203
227
# Create the release.
204
228
hub release create \
@@ -211,5 +235,12 @@ jobs:
211
235
--attach 'artifacts/paxos-x86_64-apple-darwin' \
212
236
--attach 'artifacts/paxos-aarch64-apple-darwin' \
213
237
--attach 'artifacts/paxos-x86_64-pc-windows-msvc.exe' \
238
+ --attach 'artifacts/paxos-aarch64-pc-windows-msvc.exe' \
214
239
"v$VERSION"
215
240
echo "Created release v$VERSION."
241
+ - uses : stepchowfun/toast/.github/actions/toast@main
242
+ with :
243
+ tasks : publish
244
+ docker_repo : stephanmisc/toast
245
+ env :
246
+ CRATES_IO_TOKEN : ${{ secrets.CRATES_IO_TOKEN }}
0 commit comments