Debian Codegraph @

debian/missing-sources/wide/.github/workflows/rust.yml

raw symbols SCIP
1 name: Rust
2
3 on:
4 push: {}
5 pull_request: {}
6
7 jobs:
8 build_test:
9 runs-on: ${{ matrix.rust.os }}
10 strategy:
11 matrix:
12 rust:
13 # x86
14 - { target: i686-pc-windows-msvc, toolchain: "1.61", os: windows-latest }
15 - { target: i686-pc-windows-msvc, toolchain: stable, os: windows-latest }
16 - { target: i686-pc-windows-msvc, toolchain: beta, os: windows-latest }
17 - { target: i686-pc-windows-msvc, toolchain: nightly, os: windows-latest }
18 # x86_64
19 - { target: x86_64-unknown-linux-gnu, toolchain: "1.61", os: ubuntu-latest }
20 - { target: x86_64-unknown-linux-gnu, toolchain: stable, os: ubuntu-latest }
21 - { target: x86_64-unknown-linux-gnu, toolchain: beta, os: ubuntu-latest }
22 - { target: x86_64-unknown-linux-gnu, toolchain: nightly, os: ubuntu-latest }
23 # aarch64
24 - { target: aarch64-apple-darwin, toolchain: "1.61", os: macos-latest }
25 - { target: aarch64-apple-darwin, toolchain: stable, os: macos-latest }
26 - { target: aarch64-apple-darwin, toolchain: beta, os: macos-latest }
27 - { target: aarch64-apple-darwin, toolchain: nightly, os: macos-latest }
28 # wasm32
29 #- { target: wasm32-wasi, toolchain: "1.61", os: ubuntu-latest, wasmtime: v5.0.0 }
30 #- { target: wasm32-wasi, toolchain: stable, os: ubuntu-latest, wasmtime: v5.0.0 }
31 #- { target: wasm32-wasip1, toolchain: beta, os: ubuntu-latest, wasmtime: v5.0.0 }
32 #- { target: wasm32-wasip1, toolchain: nightly, os: ubuntu-latest, wasmtime: v5.0.0 }
33 steps:
34 - uses: actions/checkout@v4
35 - uses: dtolnay/rust-toolchain@master
36 with:
37 toolchain: ${{ matrix.rust.toolchain }}
38 target: ${{ matrix.rust.target }}
39
40 - name: Install wasmtime
41 if: matrix.rust.target == 'wasm32-wasi' || matrix.rust.target == 'wasm32-wasip1'
42 run: |
43 curl https://wasmtime.dev/install.sh -sSf | bash -s -- --version ${{ matrix.rust.wasmtime }}
44 echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
45
46 - name: Build the crate
47 run: cargo build --target ${{ matrix.rust.target }}
48
49 - name: Test with default CPU features + No Default Cargo Features
50 env:
51 CARGO_TARGET_WASM32_WASI_RUNNER: wasmtime run --wasm-features all --dir .
52 run: cargo test --target ${{ matrix.rust.target }} --no-default-features
53 - name: Test with default CPU features + All Cargo Features
54 env:
55 CARGO_TARGET_WASM32_WASI_RUNNER: wasmtime run --wasm-features all --dir .
56 run: cargo test --target ${{ matrix.rust.target }} --all-features
57
58 - name: Build the crate with SSE4.1 (the "native" of CI will be above this)
59 if: matrix.rust.os == 'ubuntu-latest' && matrix.rust.target == 'x86_64-unknown-linux-gnu'
60 run: RUSTFLAGS="-Ctarget-feature=+sse4.1" cargo build --target ${{ matrix.rust.target }}
61
62 - name: switch over to native cpu features
63 run: mv .cargo-ci .cargo
64
65 - name: Test with 'native' CPU features + No Default Cargo Features
66 run: cargo test --target ${{ matrix.rust.target }} --no-default-features
67
68 - name: Test with 'native' CPU features + All Cargo Features
69 run: cargo test --target ${{ matrix.rust.target }} --all-features
70
71 #cross_compile_aarch64:
72 # runs-on: ubuntu-latest
73 # strategy:
74 # matrix:
75 # rust: ["1.61", stable, nightly]
76 # features: ["", "std"]
77 # steps:
78 # - name: Installing emulator and linker
79 # run: |
80 # sudo apt-get update
81 # sudo apt-get install qemu binfmt-support qemu-user-static gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
82 # - name: Installing Rust toolchain
83 # uses: dtolnay/rust-toolchain@master
84 # with:
85 # toolchain: ${{ matrix.rust }}
86 # target: aarch64-unknown-linux-musl
87 # - uses: actions/checkout@v4
88 # - name: build
89 # run: >
90 # cargo build --verbose --no-default-features --target aarch64-unknown-linux-musl --features "$FEATURES"
91 # env:
92 # CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc
93 # - name: test
94 # run: >
95 # cargo test --tests --benches --no-default-features --target aarch64-unknown-linux-musl --features "$FEATURES"
96 # env:
97 # FEATURES: ${{ matrix.features }}
98 # CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc