Skip to content

Commit

Permalink
CI: Update things
Browse files Browse the repository at this point in the history
  • Loading branch information
YaLTeR committed Oct 2, 2023
1 parent 3e4530a commit 2898fa2
Showing 1 changed file with 30 additions and 46 deletions.
76 changes: 30 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,33 @@ jobs:
features: ['', dlopen]

name: ${{ matrix.rust }} - ${{ matrix.features }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
show-progress: false

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
toolchain: ${{ matrix.rust }}
run: |
rustup set auto-self-update check-only
rustup toolchain install ${{ matrix.rust }} --profile minimal
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --all --features=${{ matrix.features }}
run: cargo build --all --features=${{ matrix.features }}

- name: Set up XDG_RUNTIME_DIR
run: |
mkdir .runtime
echo "XDG_RUNTIME_DIR=$PWD/.runtime" >> $GITHUB_ENV
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all --features=${{ matrix.features }}
run: cargo test --all --features=${{ matrix.features }}

- name: Generate documentation
uses: actions-rs/cargo@v1
with:
command: doc
args: --features=${{ matrix.features }}
run: cargo doc --features=${{ matrix.features }}

- name: Copy documentation index
run: cp doc/index.html target/doc/
Expand All @@ -70,43 +61,36 @@ jobs:

clippy:
name: clippy
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
with:
profile: minimal
override: true
toolchain: stable
components: clippy
show-progress: false

- uses: Swatinem/rust-cache@v1
- name: Install Rust
run: |
rustup set auto-self-update check-only
rustup toolchain install stable --profile minimal --component clippy
- uses: Swatinem/rust-cache@v2

- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all
run: cargo clippy --all --all-targets

rustfmt:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
show-progress: false

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
toolchain: nightly
components: rustfmt
run: |
rustup set auto-self-update check-only
rustup toolchain install nightly --profile minimal --component rustfmt
rustup override set nightly
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

0 comments on commit 2898fa2

Please sign in to comment.