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
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Update apt repos
|
- name: Update apt repos
|
||||||
run: sudo apt-get -y update
|
run: sudo apt -y update
|
||||||
- name: Install dependencies
|
- 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
|
- name: Install toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
override: true
|
- name: Rust cache
|
||||||
- name: Cargo check
|
uses: Swatinem/rust-cache@v2
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
with:
|
||||||
command: check
|
shared-key: common
|
||||||
args: --all
|
- name: Cargo check
|
||||||
|
run: cargo check --workspace
|
||||||
|
|
||||||
lints:
|
lints:
|
||||||
name: Lints
|
name: Lints
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -39,31 +39,25 @@ jobs:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Update apt repos
|
- name: Update apt repos
|
||||||
run: sudo apt-get -y update
|
run: sudo apt -y update
|
||||||
- name: Install dependencies
|
- 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
|
- name: Install toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
components: clippy, rustfmt
|
components: clippy, rustfmt
|
||||||
override: true
|
- name: Rust cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
shared-key: common
|
||||||
- name: Cargo fmt
|
- name: Cargo fmt
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo fmt --all -- --check
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --all -- --check
|
|
||||||
- name: Cargo doc
|
- name: Cargo doc
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo doc --workspace --no-deps
|
||||||
with:
|
|
||||||
command: doc
|
|
||||||
args: --workspace --no-deps
|
|
||||||
- name: Cargo clippy
|
- name: Cargo clippy
|
||||||
uses: actions-rs/clippy-check@v1
|
run: cargo clippy --workspace --tests -- -D warnings
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
args: --all --tests -- -D warnings
|
|
||||||
tests:
|
tests:
|
||||||
name: Test
|
name: Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -78,20 +72,20 @@ jobs:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Update apt repos
|
- name: Update apt repos
|
||||||
run: sudo apt-get -y update
|
run: sudo apt -y update
|
||||||
- name: Install dependencies
|
- 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
|
- name: Install toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
override: true
|
- name: Rust cache
|
||||||
- name: Cargo test
|
uses: Swatinem/rust-cache@v2
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
with:
|
||||||
command: test
|
shared-key: common
|
||||||
args: --all
|
- name: Cargo test
|
||||||
|
run: cargo test --workspace
|
||||||
|
|
||||||
wasm:
|
wasm:
|
||||||
name: WASM
|
name: WASM
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -104,16 +98,18 @@ jobs:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Update apt repos
|
- name: Update apt repos
|
||||||
run: sudo apt-get -y update
|
run: sudo apt -y update
|
||||||
- name: Install dependencies
|
- 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
|
- name: Install toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
target: wasm32-unknown-unknown
|
target: wasm32-unknown-unknown
|
||||||
override: true
|
- name: Rust cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
shared-key: common
|
||||||
- name: WASM build
|
- name: WASM build
|
||||||
run: cargo run-wasm --build-only ${{ matrix.example }}
|
run: cargo run-wasm --build-only ${{ matrix.example }}
|
||||||
|
|
||||||
|
@ -132,12 +128,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repository: parasyte/pixels-ci-rust-version
|
repository: parasyte/pixels-ci-rust-version
|
||||||
- name: Install toolchain
|
- name: Install toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
override: true
|
- name: Rust cache
|
||||||
- name: Cargo build
|
uses: Swatinem/rust-cache@v2
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
with:
|
||||||
command: build
|
shared-key: common
|
||||||
|
- name: Cargo build
|
||||||
|
run: cargo build
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1 @@
|
||||||
/target
|
/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