Skip to content

Commit bcdc170

Browse files
committed
Test cross-compilation with stable gnullvm targets
1 parent 39d6882 commit bcdc170

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

@@ -41,13 +40,6 @@ jobs:
4140

4241
- name: Add toolchain target
4342
run: rustup target add ${{ matrix.target }}
44-
if: contains(matrix.target, 'gnullvm') == false
45-
46-
- name: Add nightly toolchain with gnullvm target
47-
run: |
48-
rustup default ${{ matrix.version }}
49-
rustup target add ${{ matrix.target }}
50-
if: startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
5143

5244
- name: Install gcc-mingw-w64-x86-64
5345
run: sudo apt-get install -y gcc-mingw-w64-x86-64
@@ -60,20 +52,20 @@ jobs:
6052
- name: LLVM MinGW toolchain cache configuration
6153
id: cache-llvm-mingw-toolchain
6254
uses: actions/cache@v4
63-
if: startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
55+
if: contains(matrix.target, 'gnullvm')
6456
with:
6557
path: ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}
6658
key: ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}
6759

6860
- name: Install LLVM MinGW toolchain
69-
if: startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly' && steps.cache-llvm-mingw-toolchain.outputs.cache-hit != 'true'
61+
if: contains(matrix.target, 'gnullvm') && steps.cache-llvm-mingw-toolchain.outputs.cache-hit != 'true'
7062
run: |
7163
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
7264
tar -xf ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}.tar.xz
7365
echo "${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}/bin" >> $GITHUB_PATH
7466
7567
- name: Add LLVM MinGW toolchain to PATH
76-
if: startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
68+
if: contains(matrix.target, 'gnullvm')
7769
run: |
7870
echo "${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}/bin" >> $GITHUB_PATH
7971
@@ -84,13 +76,3 @@ jobs:
8476
if (-Not (Resolve-Path "target/*/debug/deps/test_win32-*.exe" | Test-Path)) {
8577
throw "Failed to find test_win32 executable."
8678
}
87-
if: contains(matrix.target, 'gnullvm') == false
88-
89-
- name: Test gnullvm
90-
shell: pwsh
91-
run: |
92-
cargo test --no-run --target ${{ matrix.target }} -p test_win32
93-
if (-Not (Resolve-Path "target/*/debug/deps/test_win32-*.exe" | Test-Path)) {
94-
throw "Failed to find test_win32 executable."
95-
}
96-
if: startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'

0 commit comments

Comments
 (0)