Skip to content

Commit 60fc2c7

Browse files
Add i686 testing to CI.
1 parent 667fd3e commit 60fc2c7

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,40 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: [ubuntu-latest, windows-latest, macos-latest]
19+
arch: [x86_64, i686]
20+
exclude:
21+
# i686 does not exist for macOS
22+
- os: macos-latest
23+
arch: i686
1924

2025
runs-on: ${{ matrix.os }}
2126

27+
env:
28+
# This is string environment variable which happens to be JSON.
29+
# We use the builtin fromJSON() function below to convert it into
30+
# a map.
31+
target_map: |
32+
{
33+
"ubuntu-latest": "unknown-linux-gnu",
34+
"windows-latest": "pc-windows-msvc",
35+
"macos-latest": "apple-darwin"
36+
}
37+
2238
steps:
2339
- uses: actions/checkout@v2
2440
- name: Update Stable Rust
2541
run: rustup update stable
42+
- name: Install GCC multilib
43+
if: ${{ matrix.arch == 'i686' && matrix.os == 'ubuntu-latest' }}
44+
run: sudo apt install -y gcc-multilib
45+
- name: Add target architecture
46+
run: rustup target add ${{ matrix.arch }}-${{ fromJSON(env.target_map)[matrix.os] }}
2647
- name: Check formatting
2748
run: cargo fmt -- --check
2849
- name: Run tests
29-
run: cargo test --verbose
50+
run: cargo test --verbose --target ${{ matrix.arch }}-${{ fromJSON(env.target_map)[matrix.os] }}
3051
- name: Run tests (no_simd)
31-
run: cargo test --verbose --features=no_simd
52+
run: cargo test --verbose --target ${{ matrix.arch }}-${{ fromJSON(env.target_map)[matrix.os] }} --features=no_simd
3253
- name: Build docs
3354
run: cargo doc --verbose
3455

0 commit comments

Comments
 (0)