Skip to content

Commit 35ec5f5

Browse files
committed
fixed testing harness: made some amends, changed nightly version, used cargo-binstall for cross install
1 parent cdee75e commit 35ec5f5

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

.github/workflows/common.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ jobs:
173173
with:
174174
target: ${{ matrix.target }}
175175

176-
test-build-std:
176+
test-nightly-only:
177+
# These environments have cross support, but don't have rust-std, so cross has to build core, so, nightly-only
177178
strategy:
178179
fail-fast: false
179180
matrix:
@@ -190,5 +191,4 @@ jobs:
190191
uses: ./.github/workflows/runtest.yml
191192
with:
192193
target: ${{ matrix.target }}
193-
channel: nightly
194-
build-std: true
194+
channel: nightly

.github/workflows/runtest.yml

+16-8
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ on:
1212
required: false
1313
type: string
1414
default: ''
15-
build-std:
16-
required: false
17-
type: boolean
18-
default: false
1915

2016
jobs:
2117
test:
@@ -33,20 +29,32 @@ jobs:
3329
toolchain: ${{ inputs.channel }}
3430
profile: minimal
3531
override: true
32+
if: inputs.channel != nightly
33+
34+
# the nightly 2024-05-18 has a bug where it is not understanding -fuse-ld=lld
35+
- name: Install Rust
36+
uses: actions-rs/toolchain@v1
37+
with:
38+
toolchain: nightly-2024-05-11
39+
profile: minimal
40+
override: true
41+
if: inputs.channel == 'nightly'
3642

3743
- run: ${{ format('echo "{0}" >> $GITHUB_ENV', inputs.env-vars) }}
3844

3945
- name: Build
4046
uses: actions-rs/cargo@v1
4147
with:
42-
use-cross: true
4348
command: build
44-
args: --target ${{ inputs.target }} ${{ inputs.channel == 'nightly' && '--features=nightly' || '' }} ${{ inputs.build-std && '-Z build-std=core' || '' }}
49+
args: --target ${{ inputs.target }} ${{ inputs.channel == 'nightly' && '--features=nightly' || '' }}
50+
51+
# Install cross via cargo-binstall to save time
52+
- uses: cargo-bins/cargo-binstall@main
53+
- run: cargo binstall cross
4554

4655
- name: Test
4756
uses: actions-rs/cargo@v1
4857
with:
4958
use-cross: true
5059
command: test
51-
args: --target ${{ inputs.target }} ${{ inputs.channel == 'nightly' && '--features=nightly' || '' }}
52-
60+
args: --target ${{ inputs.target }} ${{ inputs.channel == 'nightly' && '--features=nightly' || '' }}

0 commit comments

Comments
 (0)