Skip to content

Move optional checks to the end. #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 53 additions & 53 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,41 @@ jobs:
export PATH=$PATH:$(go env GOPATH)/bin
addlicense -check .

audit:
bazel:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Run cargo audit
run: |
cp -p cargo/Cargo.lock .
cargo audit

outdated:
runs-on: ubuntu-latest
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cache/bazel
~/.cache/bazelisk
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry
key: ${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion', 'cargo/Cargo.lock') }}

steps:
- uses: actions/checkout@v2
- name: Build
run: bazelisk build //...

- name: Run cargo outdated
run: cargo outdated --exit-code 1
- name: Format (buildifier)
run: |
GO111MODULE=on go get -u github.com/bazelbuild/buildtools/buildifier@3.4.0
export PATH=$PATH:$(go env GOPATH)/bin
buildifier -mode=check WORKSPACE
buildifier -mode=check BUILD
buildifier -mode=check examples/BUILD

- name: Check freshness of cargo/Cargo.lock
- name: Format (cargo raze)
run: |
cargo generate-lockfile
cargo install cargo-raze --version 0.3.8
cp -p cargo/Cargo.lock .
rm -rf cargo/
cargo raze --output=cargo
mv Cargo.lock cargo/
git diff --exit-code

Expand All @@ -80,13 +92,13 @@ jobs:

- name: Build
env:
RUSTFLAGS: -C link-args=-S -D warnings
run: cargo build --target=wasm32-unknown-unknown --release --all-targets
RUSTFLAGS: -D warnings -C link-args=-S
run: cargo build --release --all-targets --target=wasm32-unknown-unknown

- name: Format (clippy)
env:
RUSTFLAGS: -C link-args=-S -D warnings
run: cargo clippy --target=wasm32-unknown-unknown --release --all-targets
RUSTFLAGS: -D warnings -C link-args=-S
run: cargo clippy --release --all-targets --target=wasm32-unknown-unknown

- name: Format (rustfmt)
run: cargo fmt -- --check
Expand All @@ -110,64 +122,52 @@ jobs:
run: |
rustup toolchain install nightly --component clippy --component rustfmt
rustup +nightly target add wasm32-unknown-unknown
rustup default nightly

- name: Build
env:
RUSTFLAGS: -C link-args=-S -D warnings
run: cargo +nightly build --target=wasm32-unknown-unknown --release --all-targets
RUSTFLAGS: -D warnings -C link-args=-S
run: cargo build --release --all-targets --target=wasm32-unknown-unknown

- name: Format (clippy)
env:
RUSTFLAGS: -C link-args=-S -D warnings
run: cargo +nightly clippy --target=wasm32-unknown-unknown --release --all-targets
RUSTFLAGS: -D warnings -C link-args=-S
run: cargo clippy --release --all-targets --target=wasm32-unknown-unknown

- name: Format (rustfmt)
run: cargo +nightly fmt -- --check
run: cargo fmt -- --check

- name: Format (manifest)
run: cargo +nightly verify-project
run: cargo verify-project

- name: Package (docs)
run: cargo +nightly doc --no-deps --target=wasm32-unknown-unknown
run: cargo doc --no-deps --target=wasm32-unknown-unknown

- name: Package (publish)
run: cargo +nightly publish --dry-run --target=wasm32-unknown-unknown
run: cargo publish --dry-run --target=wasm32-unknown-unknown

bazel:
outdated:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cache/bazel
~/.cache/bazelisk
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry
key: ${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion', 'cargo/Cargo.lock') }}
- name: Run cargo outdated
run: cargo outdated --exit-code 1

- name: Build
- name: Check freshness of cargo/Cargo.lock
run: |
bazelisk build //...
cargo generate-lockfile
mv Cargo.lock cargo/
git diff --exit-code

- name: Format (buildifier)
run: |
GO111MODULE=on go get -u github.com/bazelbuild/buildtools/buildifier@3.4.0
export PATH=$PATH:$(go env GOPATH)/bin
buildifier -mode=check WORKSPACE
buildifier -mode=check BUILD
buildifier -mode=check examples/BUILD
audit:
runs-on: ubuntu-latest

- name: Format (cargo raze)
steps:
- uses: actions/checkout@v2

- name: Run cargo audit
run: |
cargo install cargo-raze --version 0.3.8
cp -p cargo/Cargo.lock .
rm -rf cargo/
cargo raze --output=cargo
mv Cargo.lock cargo/
git diff --exit-code
cargo audit