mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-23 12:09:37 +00:00
351436a258
* De-duplicate Dockerfiles by using a bash file to concatenate common parts Resolves #375. Dockerfiles are still committed to the repo to avoid a dependency on bash. * Add a CI job to confirm the committed dockerfiles are the currently generated ones * Create dedicated Dockerfiles per processor network Ensures the compromising of network-specific dependencies doesn't lead to a compromise of the build process for all processors. * Dockerfile corrections * Correct call to build processor Docker image in tests/processor
76 lines
2.2 KiB
YAML
76 lines
2.2 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
clippy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
|
|
|
|
- name: Get nightly version to use
|
|
id: nightly
|
|
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Build Dependencies
|
|
uses: ./.github/actions/build-dependencies
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
rust-toolchain: ${{ steps.nightly.outputs.version }}
|
|
rust-components: clippy
|
|
|
|
- name: Run Clippy
|
|
run: cargo clippy --all-features --all-targets -- -D warnings -A clippy::items_after_test_module
|
|
|
|
deny:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
|
|
|
|
- name: Advisory Cache
|
|
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
|
|
with:
|
|
path: ~/.cargo/advisory-db
|
|
key: rust-advisory-db
|
|
|
|
- name: Install cargo
|
|
uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0
|
|
with:
|
|
toolchain: 1.73.0
|
|
|
|
- name: Install cargo deny
|
|
run: cargo install --locked cargo-deny
|
|
|
|
- name: Run cargo deny
|
|
run: cargo deny -L error --all-features check
|
|
|
|
fmt:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
|
|
|
|
- name: Get nightly version to use
|
|
id: nightly
|
|
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Install rustfmt
|
|
uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0
|
|
with:
|
|
toolchain: ${{ steps.nightly.outputs.version }}
|
|
components: rustfmt
|
|
|
|
- name: Run rustfmt
|
|
run: cargo +${{ steps.nightly.outputs.version }} fmt -- --check
|
|
|
|
dockerfiles:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
|
|
- name: Verify Dockerfiles are up to date
|
|
# Runs the file which generates them and checks the diff has no lines
|
|
run: cd orchestration && ./dockerfiles.sh && git diff | wc -l | grep -x "0"
|