Skip to content

Commit d46abfb

Browse files
authored
Merge pull request #177 from kazuki0824/fix/windows-ci-error
Fix: CI エラーの修正
2 parents 5fb4051 + 8b49ba4 commit d46abfb

1 file changed

Lines changed: 21 additions & 9 deletions

File tree

.github/workflows/rust.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,14 @@ jobs:
8989
strategy:
9090
fail-fast: false
9191
matrix:
92-
toolchain:
93-
- stable-x86_64-pc-windows-gnu
94-
- stable-x86_64-pc-windows-msvc
95-
- stable-i686-pc-windows-gnu
92+
include:
93+
- toolchain: stable-x86_64-pc-windows-gnu
94+
target: x86_64-pc-windows-gnu
95+
msystem: mingw64
96+
- toolchain: stable-x86_64-pc-windows-msvc
97+
target: x86_64-pc-windows-msvc
98+
- toolchain: stable-x86_64-pc-windows-msvc
99+
target: i686-pc-windows-msvc
96100
steps:
97101
- name: Install or Update Clang and LLVM for bindgen
98102
if: endsWith(matrix.toolchain, 'msvc')
@@ -107,7 +111,7 @@ jobs:
107111
- uses: msys2/setup-msys2@v2
108112
if: endsWith(matrix.toolchain, 'gnu')
109113
with:
110-
msystem: mingw64
114+
msystem: ${{ matrix.msystem }}
111115
update: true
112116
pacboy: >-
113117
git:
@@ -127,18 +131,26 @@ jobs:
127131
if: endsWith(matrix.toolchain, 'msvc')
128132
run: |
129133
$env:RUSTFLAGS="-C target-feature=+crt-static"
130-
cargo check --workspace --verbose
134+
rustup target add ${{ matrix.target }}
135+
cargo check --workspace --verbose --target ${{ matrix.target }}
131136
- name: Run tests(MSVC)
132137
if: endsWith(matrix.toolchain, 'msvc')
133138
run: |
134139
$env:RUSTFLAGS="-C target-feature=+crt-static"
135-
cargo test --workspace --verbose
140+
rustup target add ${{ matrix.target }}
141+
cargo test --workspace --verbose --target ${{ matrix.target }}
136142
137143
- name: Check(MinGW)
138144
shell: msys2 {0}
139145
if: endsWith(matrix.toolchain, 'gnu')
140-
run: export PATH=$PATH:/c/Users/runneradmin/.cargo/bin && cargo check --workspace --verbose
146+
run: |
147+
export PATH=$PATH:/c/Users/runneradmin/.cargo/bin
148+
rustup target add ${{ matrix.target }}
149+
cargo check --workspace --verbose --target ${{ matrix.target }}
141150
- name: Run tests(MinGW)
142151
shell: msys2 {0}
143152
if: endsWith(matrix.toolchain, 'gnu')
144-
run: export PATH=$PATH:/c/Users/runneradmin/.cargo/bin && cargo test --workspace --verbose
153+
run: |
154+
export PATH=$PATH:/c/Users/runneradmin/.cargo/bin
155+
rustup target add ${{ matrix.target }}
156+
cargo test --workspace --verbose --target ${{ matrix.target }}

0 commit comments

Comments
 (0)