1name: CI 2 3on: 4 push: 5 branches: [v1] 6 pull_request: 7 workflow_dispatch: 8 merge_group: 9 types: [checks_requested] 10 11jobs: 12 ci: 13 name: Build/Test 14 strategy: 15 matrix: 16 toolchain: ["stable", "beta", "nightly", "1.36.0"] 17 os: [ubuntu-latest] 18 include: 19 - toolchain: stable 20 fuzz: 1 21 - toolchain: beta 22 fuzz: 1 23 - os: windows-latest 24 toolchain: nightly 25 26 runs-on: ${{ matrix.os }} 27 28 steps: 29 - uses: actions/checkout@v4 30 31 - name: Install packages for fuzzing 32 if: runner.os == 'Linux' && matrix.fuzz == 1 33 run: sudo apt-get update -y && sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev 34 35 - name: Install toolchain 36 uses: dtolnay/rust-toolchain@master 37 with: 38 toolchain: ${{ matrix.toolchain }} 39 40 - name: Cargo build 41 run: cargo build --verbose 42 43 - name: Cargo test 44 if: matrix.toolchain != '1.36.0' 45 run: cargo test --verbose 46 47 - name: Cargo test w/ serde 48 if: matrix.toolchain != '1.36.0' 49 run: cargo test --verbose --features serde 50 51 - name: Cargo check w/o default features 52 if: matrix.toolchain == 'nightly' 53 run: cargo check --verbose --no-default-features 54 55 - name: Cargo test w/ union 56 if: matrix.toolchain == 'beta' 57 run: cargo test --verbose --features union 58 59 - name: Cargo test w/ debugger_visualizer 60 if: matrix.toolchain == 'nightly' 61 run: cargo test --test debugger_visualizer --verbose --features debugger_visualizer -- --test-threads=1 62 63 - name: Cargo test w/ debugger_visualizer and union 64 if: matrix.toolchain == 'nightly' 65 run: cargo test --test debugger_visualizer --verbose --features 'debugger_visualizer,union' -- --test-threads=1 66 67 - name: Cargo test all features 68 if: matrix.toolchain == 'nightly' 69 run: cargo test --verbose --all-features 70 71 - name: Cargo bench 72 if: matrix.toolchain == 'nightly' 73 run: cargo bench --verbose bench 74 75 - name: miri 76 if: matrix.toolchain == 'nightly' && matrix.os == 'ubuntu-latest' 77 run: bash ./scripts/run_miri.sh 78 env: 79 MIRIFLAGS: '-Zmiri-tag-raw-pointers' 80 81 - name: fuzz 82 if: matrix.fuzz == 1 83 working-directory: fuzz 84 run: ./travis-fuzz.sh 85 86 no-std: 87 name: no_std 88 runs-on: ubuntu-latest 89 steps: 90 - uses: actions/checkout@v4 91 - name: Install toolchain 92 uses: dtolnay/rust-toolchain@master 93 with: 94 toolchain: stable 95 target: thumbv7m-none-eabi 96 - name: Cargo build 97 run: cargo build --verbose 98 99 build_result: 100 name: Result 101 runs-on: ubuntu-latest 102 needs: 103 - "ci" 104 - "no-std" 105 106 steps: 107 - name: Mark the job as successful 108 run: exit 0 109 if: success() 110 - name: Mark the job as unsuccessful 111 run: exit 1 112 if: "!success()" 113