1name: CI 2on: [push, pull_request] 3jobs: 4 5 lint: 6 name: Lint 7 runs-on: ubuntu-latest 8 steps: 9 - uses: actions/checkout@v2 10 11 - uses: actions-rs/toolchain@v1 12 with: 13 toolchain: stable 14 components: rustfmt, clippy 15 16 # make sure all code has been formatted with rustfmt and linted with clippy 17 - name: rustfmt 18 run: cargo fmt -- --check --color always 19 20 # run clippy to verify we have no warnings 21 - run: cargo fetch 22 - name: cargo clippy 23 run: cargo clippy --workspace --all-targets --all-features -- -D warnings 24 25 # check that codegen output matches committed source files 26 - name: codegen 27 run: cargo run --release -p codegen -- --check 28 29 test: 30 name: Test 31 strategy: 32 matrix: 33 os: [ubuntu-latest, macos-latest, windows-latest] 34 #toolchain: [1.58.1, stable, beta, nightly] # weirdness with 1.58.1 and git2 35 toolchain: [stable, beta, nightly] 36 runs-on: ${{ matrix.os }} 37 steps: 38 - uses: actions/checkout@v2 39 - run: rustup update --no-self-update ${{ matrix.toolchain }} 40 - run: rustup default ${{ matrix.toolchain }} 41 - run: ./build_and_test_features.sh 42 shell: bash 43 44 test-core-simd: 45 name: Test portable simd 46 strategy: 47 matrix: 48 os: [ubuntu-latest, macos-latest, windows-latest] 49 toolchain: [nightly] 50 runs-on: ${{ matrix.os }} 51 steps: 52 - uses: actions/checkout@v2 53 - run: rustup update --no-self-update ${{ matrix.toolchain }} 54 - run: rustup default ${{ matrix.toolchain }} 55 - run: cargo test --features core-simd 56 shell: bash 57 58 test-wasm: 59 name: Test wasm 60 strategy: 61 matrix: 62 toolchain: [stable] 63 os: [ubuntu-latest] 64 runs-on: ${{ matrix.os }} 65 steps: 66 - uses: actions/checkout@v2 67 68 - name: Install 69 run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh 70 71 - run: ./build_and_test_wasm32_firefox.sh 72 - run: ./build_and_test_wasm32_chrome.sh 73