Skip to content

Commit 8bea710

Browse files
committed
Test cross-compilation with stable gnullvm targets
1 parent cd1e096 commit 8bea710

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

.github/workflows/cross.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
# https://sourceforge.net/p/mingw-w64/wiki2/Exception%20Handling
2929
#
3030
image: [macos-latest, ubuntu-latest]
31-
version: [stable, nightly]
3231
target: [x86_64-pc-windows-gnu, aarch64-pc-windows-gnullvm, x86_64-pc-windows-gnullvm, i686-pc-windows-gnullvm]
3332
runs-on: ${{ matrix.image }}
3433

@@ -38,13 +37,6 @@ jobs:
3837

3938
- name: Add toolchain target
4039
run: rustup target add ${{ matrix.target }}
41-
if: contains(matrix.target, 'gnullvm') == false
42-
43-
- name: Add nightly toolchain with gnullvm target
44-
run: |
45-
rustup default ${{ matrix.version }}
46-
rustup target add ${{ matrix.target }}
47-
if: startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
4840

4941
- name: Install gcc-mingw-w64-x86-64
5042
run: sudo apt-get install -y gcc-mingw-w64-x86-64
@@ -57,20 +49,20 @@ jobs:
5749
- name: LLVM MinGW toolchain cache configuration
5850
id: cache-llvm-mingw-toolchain
5951
uses: actions/cache@v4
60-
if: startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
52+
if: startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm')
6153
with:
6254
path: ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}
6355
key: ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}
6456

6557
- name: Install LLVM MinGW toolchain
66-
if: startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly' && steps.cache-llvm-mingw-toolchain.outputs.cache-hit != 'true'
58+
if: startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && steps.cache-llvm-mingw-toolchain.outputs.cache-hit != 'true'
6759
run: |
6860
curl -L -o ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}.tar.xz https://github.com/mstorsjo/llvm-mingw/releases/download/20220906/${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}.tar.xz
6961
tar -xf ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}.tar.xz
7062
echo "${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}/bin" >> $GITHUB_PATH
7163
7264
- name: Add LLVM MinGW toolchain to PATH
73-
if: startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
65+
if: startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm')
7466
run: |
7567
echo "${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}/bin" >> $GITHUB_PATH
7668
@@ -81,13 +73,3 @@ jobs:
8173
if (-Not (Resolve-Path "target/*/debug/deps/test_win32-*.exe" | Test-Path)) {
8274
throw "Failed to find test_win32 executable."
8375
}
84-
if: contains(matrix.target, 'gnullvm') == false
85-
86-
- name: Test gnullvm
87-
shell: pwsh
88-
run: |
89-
cargo test --no-run --target ${{ matrix.target }} -p test_win32
90-
if (-Not (Resolve-Path "target/*/debug/deps/test_win32-*.exe" | Test-Path)) {
91-
throw "Failed to find test_win32 executable."
92-
}
93-
if: startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'

0 commit comments

Comments
 (0)