Update GitHub Actions (#322)
* Update GitHub Actions - actions-rs is unmaintained. - See: https://github.com/actions-rs/toolchain/issues/216 - Enable rust-cache - Cargo.lock was removed in #63 but it's necessary for reproducible builds in CI. - The lock file is ignored by dependents. - Our separate `pixels-ci-rust-version` repo also ignores it, so CI will still be able to tell us if the crate build ever breaks due to unlocked dependencies. - See the `rust-version` job in ci.yml.
This commit is contained in:
parent
7278681422
commit
0819b8f60c
88
.github/workflows/ci.yml
vendored
88
.github/workflows/ci.yml
vendored
|
@ -18,20 +18,20 @@ jobs:
|
|||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
- name: Update apt repos
|
||||
run: sudo apt-get -y update
|
||||
run: sudo apt -y update
|
||||
- name: Install dependencies
|
||||
run: sudo apt -y install libsdl2-dev libgtk-3-dev
|
||||
run: sudo apt -y install libgtk-3-dev libudev-dev
|
||||
- name: Install toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
- name: Cargo check
|
||||
uses: actions-rs/cargo@v1
|
||||
- name: Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
command: check
|
||||
args: --all
|
||||
shared-key: common
|
||||
- name: Cargo check
|
||||
run: cargo check --workspace
|
||||
|
||||
lints:
|
||||
name: Lints
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -39,31 +39,25 @@ jobs:
|
|||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
- name: Update apt repos
|
||||
run: sudo apt-get -y update
|
||||
run: sudo apt -y update
|
||||
- name: Install dependencies
|
||||
run: sudo apt -y install libsdl2-dev libgtk-3-dev
|
||||
run: sudo apt -y install libgtk-3-dev libudev-dev
|
||||
- name: Install toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
components: clippy, rustfmt
|
||||
override: true
|
||||
- name: Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: common
|
||||
- name: Cargo fmt
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
run: cargo fmt --all -- --check
|
||||
- name: Cargo doc
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: doc
|
||||
args: --workspace --no-deps
|
||||
run: cargo doc --workspace --no-deps
|
||||
- name: Cargo clippy
|
||||
uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
args: --all --tests -- -D warnings
|
||||
run: cargo clippy --workspace --tests -- -D warnings
|
||||
|
||||
tests:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -78,20 +72,20 @@ jobs:
|
|||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
- name: Update apt repos
|
||||
run: sudo apt-get -y update
|
||||
run: sudo apt -y update
|
||||
- name: Install dependencies
|
||||
run: sudo apt -y install libsdl2-dev libgtk-3-dev
|
||||
run: sudo apt -y install libgtk-3-dev libudev-dev
|
||||
- name: Install toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
- name: Cargo test
|
||||
uses: actions-rs/cargo@v1
|
||||
- name: Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
command: test
|
||||
args: --all
|
||||
shared-key: common
|
||||
- name: Cargo test
|
||||
run: cargo test --workspace
|
||||
|
||||
wasm:
|
||||
name: WASM
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -104,16 +98,18 @@ jobs:
|
|||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
- name: Update apt repos
|
||||
run: sudo apt-get -y update
|
||||
run: sudo apt -y update
|
||||
- name: Install dependencies
|
||||
run: sudo apt -y install libsdl2-dev libgtk-3-dev
|
||||
run: sudo apt -y install libgtk-3-dev libudev-dev
|
||||
- name: Install toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
target: wasm32-unknown-unknown
|
||||
override: true
|
||||
- name: Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: common
|
||||
- name: WASM build
|
||||
run: cargo run-wasm --build-only ${{ matrix.example }}
|
||||
|
||||
|
@ -132,12 +128,12 @@ jobs:
|
|||
with:
|
||||
repository: parasyte/pixels-ci-rust-version
|
||||
- name: Install toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
- name: Cargo build
|
||||
uses: actions-rs/cargo@v1
|
||||
- name: Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
command: build
|
||||
shared-key: common
|
||||
- name: Cargo build
|
||||
run: cargo build
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1 @@
|
|||
/target
|
||||
Cargo.lock
|
||||
|
|
3565
Cargo.lock
generated
Normal file
3565
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue