diff --git a/.github/workflows/rust.yml b/.github/workflows/main.yml similarity index 50% rename from .github/workflows/rust.yml rename to .github/workflows/main.yml index c006b74..fe9edc0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/main.yml @@ -13,28 +13,26 @@ env: jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install up-to-date toolchain - run: | - rustup self update - rustup toolchain update stable + uses: dtolnay/rust-toolchain@stable - name: Build run: cargo build --verbose - - name: Run tests + - name: Test run: cargo test --verbose clippy: - name: Run Clippy runs-on: ubuntu-latest + permissions: security-events: write + steps: - name: Checkout code uses: actions/checkout@v4 @@ -60,3 +58,54 @@ jobs: with: sarif_file: rust-clippy-results.sarif category: Clippy + + msrv: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install up-to-date Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install cargo-msrv + run: cargo install cargo-msrv --all-features + + - name: Check msrv + run: cargo msrv --output-format json verify -- cargo check + + - name: run cargo msrv on verify failure + if: ${{ failure() }} + run: cargo msrv --output-format json -- cargo check + + build-nightly: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install up-to-date toolchain + uses: dtolnay/rust-toolchain@nightly + + - name: Build + run: cargo build --verbose + + - name: Test + run: cargo test --verbose + + miri: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install up-to-date toolchain + uses: dtolnay/rust-toolchain@nightly + with: + components: miri + + - name: Run Miri setup + run: cargo miri setup + + - name: Run Miri + run: cargo miri test \ No newline at end of file diff --git a/.github/workflows/rust-miri.yml b/.github/workflows/rust-miri.yml deleted file mode 100644 index 30e52f7..0000000 --- a/.github/workflows/rust-miri.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: rust-miri - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - schedule: - - cron: '1 2 * * 1' - -jobs: - rust-miri: - name: Run Miri - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Install up-to-date toolchain - run: | - rustup self update - rustup toolchain install nightly - rustup default nightly - rustup component add miri - - - name: Run Miri setup - run: cargo miri setup - - - name: Run Miri - run: cargo miri test \ No newline at end of file diff --git a/.github/workflows/rust-msrv.yml b/.github/workflows/rust-msrv.yml deleted file mode 100644 index fba09fc..0000000 --- a/.github/workflows/rust-msrv.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: rust-msrv - -on: - push: - branches: ["master"] - pull_request: - branches: ["master"] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: install_rust - uses: dtolnay/rust-toolchain@stable - - - name: Install cargo-msrv - run: cargo install cargo-msrv --all-features - - - name: Check msrv - run: cargo msrv --output-format json verify -- cargo check - - - name: run cargo msrv on verify failure - if: ${{ failure() }} - run: cargo msrv --output-format json -- cargo check diff --git a/.github/workflows/rust-nightly.yml b/.github/workflows/rust-nightly.yml deleted file mode 100644 index b1bb743..0000000 --- a/.github/workflows/rust-nightly.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: rust-nightly - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - schedule: - - cron: '11 10 * * *' - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Install nightly toolchain - run: | - rustup self update - rustup toolchain install nightly - rustup default nightly - - - name: Build - run: cargo build --verbose - - - name: Run tests - run: cargo test --verbose