Skip to content

Commit bdb1a18

Browse files
mati865nagisa
authored andcommitted
chore: add gnullvm cross check to the CI
1 parent 762438e commit bdb1a18

File tree

1 file changed

+56
-20
lines changed

1 file changed

+56
-20
lines changed

.github/workflows/test.yml

Lines changed: 56 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
branches:
66
- master
77
paths-ignore:
8-
- '*.mkd'
9-
- 'LICENSE'
8+
- "*.mkd"
9+
- "LICENSE"
1010
pull_request:
1111
types: [opened, reopened, synchronize]
1212
workflow_dispatch:
@@ -20,8 +20,8 @@ jobs:
2020
matrix:
2121
rust_toolchain: [nightly, stable, 1.63.0]
2222
os: [ubuntu-latest, windows-latest, macOS-latest]
23-
mode: ['--release', '-Zminimal-versions', '']
24-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
23+
mode: ["--release", "-Zminimal-versions", ""]
24+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
2525
exclude:
2626
- rust_toolchain: stable
2727
mode: -Zminimal-versions
@@ -53,7 +53,7 @@ jobs:
5353
strategy:
5454
fail-fast: false
5555
matrix:
56-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
56+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
5757
rust_target:
5858
- x86_64-pc-windows-msvc
5959
- i686-pc-windows-msvc
@@ -93,7 +93,7 @@ jobs:
9393
rust_target:
9494
- x86_64-pc-windows-gnu
9595
- i686-pc-windows-gnu
96-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
96+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
9797
include:
9898
- rust_target: x86_64-pc-windows-gnu
9999
mingw_path: C:/msys64/mingw64/bin
@@ -121,6 +121,42 @@ jobs:
121121
command: test
122122
args: --target ${{ matrix.rust_target }} --manifest-path=${{ matrix.manifest }}
123123

124+
cross-windows-gnullvm-check:
125+
name: Check ${{ matrix.manifest }} to ${{ matrix.rust_target }} with stable
126+
runs-on: ubuntu-latest
127+
env:
128+
LLVM_MINGW_VERSION: "20241030"
129+
strategy:
130+
fail-fast: false
131+
matrix:
132+
rust_target:
133+
- aarch64-pc-windows-gnullvm
134+
- i686-pc-windows-gnullvm
135+
- x86_64-pc-windows-gnullvm
136+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
137+
steps:
138+
- uses: actions/checkout@v2
139+
- uses: actions/cache@v2
140+
with:
141+
path: llvm-mingw-version
142+
key: ${{ env.LLVM_MINGW_VERSION }}
143+
- name: Install llvm-mingw
144+
if: steps.cache.outputs.cache-hit != 'true'
145+
run: curl -L https://github.com/mstorsjo/llvm-mingw/releases/download/${{ env.LLVM_MINGW_VERSION }}/llvm-mingw-${{ env.LLVM_MINGW_VERSION }}-ucrt-ubuntu-20.04-x86_64.tar.xz | tar xJf -
146+
- name: Add llvm-mingw to PATH
147+
run: echo "${{ github.workspace }}/llvm-mingw-${{ env.LLVM_MINGW_VERSION }}-ucrt-ubuntu-20.04-x86_64/bin" >> $GITHUB_PATH
148+
- name: Install Rust
149+
uses: actions-rs/toolchain@v1
150+
with:
151+
toolchain: stable
152+
profile: minimal
153+
target: ${{ matrix.rust_target }}
154+
- name: Check
155+
uses: actions-rs/cargo@v1
156+
with:
157+
command: check
158+
args: --target ${{ matrix.rust_target }} --manifest-path=${{ matrix.manifest }}
159+
124160
cross-linux-test:
125161
name: Test ${{ matrix.manifest }} on ${{ matrix.rust_target }} with nightly ${{ matrix.mode }}
126162
runs-on: ubuntu-latest
@@ -147,8 +183,8 @@ jobs:
147183
# https://github.com/rust-embedded/cross/pull/440
148184
# - powerpc64-unknown-linux-gnu
149185
- x86_64-unknown-linux-musl
150-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
151-
mode: ['--release', '-Zminimal-versions', '']
186+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
187+
mode: ["--release", "-Zminimal-versions", ""]
152188
timeout-minutes: 10
153189
steps:
154190
- uses: actions/checkout@v2
@@ -176,7 +212,7 @@ jobs:
176212
# BSDs: could be tested with full system emulation
177213
- i686-unknown-freebsd
178214
- x86_64-unknown-freebsd
179-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
215+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
180216
timeout-minutes: 10
181217
steps:
182218
- uses: actions/checkout@v2
@@ -215,7 +251,7 @@ jobs:
215251
# - sparc64-unknown-linux-gnu
216252
# BSDs: could be tested with full system emulation
217253
- x86_64-unknown-netbsd
218-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
254+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
219255
timeout-minutes: 10
220256
steps:
221257
- uses: actions/checkout@v2
@@ -243,7 +279,7 @@ jobs:
243279
rust_target:
244280
- aarch64-apple-ios
245281
- x86_64-apple-ios
246-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
282+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
247283
timeout-minutes: 10
248284
steps:
249285
- uses: actions/checkout@v2
@@ -269,8 +305,8 @@ jobs:
269305
rust_target:
270306
- x86_64-pc-windows-msvc
271307
- i686-pc-windows-msvc
272-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
273-
xwin_version: ['0.1.6']
308+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
309+
xwin_version: ["0.1.6"]
274310
timeout-minutes: 10
275311
steps:
276312
- uses: actions/checkout@v2
@@ -299,17 +335,17 @@ jobs:
299335
xwin --accept-license 1 splat --output /tmp/xwin
300336
- name: Test
301337
env:
302-
CC: 'clang-cl'
303-
CXX: 'clang-cl'
304-
AR: 'llvm-lib'
305-
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER: 'lld-link'
306-
CARGO_TARGET_I686_PC_WINDOWS_MSVC_LINKER: 'lld-link'
338+
CC: "clang-cl"
339+
CXX: "clang-cl"
340+
AR: "llvm-lib"
341+
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER: "lld-link"
342+
CARGO_TARGET_I686_PC_WINDOWS_MSVC_LINKER: "lld-link"
307343
# Note that we only disable unused-command-line-argument here since clang-cl
308344
# doesn't implement all of the options supported by cl, but the ones it doesn't
309345
# are _generally_ not interesting.
310-
CFLAGS: '-Wno-unused-command-line-argument -fuse-ld=lld-link /imsvc/tmp/xwin/crt/include /imsvc/tmp/xwin/sdk/include/ucrt /imsvc/tmp/xwin/sdk/include/um /imsvc/tmp/xwin/sdk/include/shared'
346+
CFLAGS: "-Wno-unused-command-line-argument -fuse-ld=lld-link /imsvc/tmp/xwin/crt/include /imsvc/tmp/xwin/sdk/include/ucrt /imsvc/tmp/xwin/sdk/include/um /imsvc/tmp/xwin/sdk/include/shared"
311347
# Inform the linker where to search for libraries
312-
RUSTFLAGS: '-Lnative=/tmp/xwin/crt/lib/x86_64 -Lnative=/tmp/xwin/sdk/lib/um/x86_64 -Lnative=/tmp/xwin/sdk/lib/ucrt/x86_64'
348+
RUSTFLAGS: "-Lnative=/tmp/xwin/crt/lib/x86_64 -Lnative=/tmp/xwin/sdk/lib/um/x86_64 -Lnative=/tmp/xwin/sdk/lib/ucrt/x86_64"
313349
run: |
314350
set -eux
315351
cargo build --target ${{ matrix.rust_target }} --manifest-path ${{ matrix.manifest }}

0 commit comments

Comments
 (0)