@@ -16,19 +16,40 @@ jobs:
16
16
fail-fast : false
17
17
matrix :
18
18
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
19
24
20
25
runs-on : ${{ matrix.os }}
21
26
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
+
22
38
steps :
23
39
- uses : actions/checkout@v2
24
40
- name : Update Stable Rust
25
41
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] }}
26
47
- name : Check formatting
27
48
run : cargo fmt -- --check
28
49
- name : Run tests
29
- run : cargo test --verbose
50
+ run : cargo test --verbose --target ${{ matrix.arch }}-${{ fromJSON(env.target_map)[matrix.os] }}
30
51
- 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
32
53
- name : Build docs
33
54
run : cargo doc --verbose
34
55
0 commit comments