Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinnerbone committed Jan 28, 2024
1 parent fcb74d8 commit 9bf3a42
Showing 1 changed file with 1 addition and 42 deletions.
43 changes: 1 addition & 42 deletions .github/workflows/test_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,66 +55,25 @@ jobs:
toolchain: ${{ matrix.rust_version }}
components: rustfmt, clippy

- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt install -y libasound2-dev libxcb-shape0-dev libxcb-xfixes0-dev libgtk-3-dev mesa-vulkan-drivers libpango1.0-dev
- name: Cache Cargo output
uses: Swatinem/rust-cache@v2
with:
shared-key: "desktop"
save-if: ${{ github.ref == 'refs/heads/master' }}

- name: Check formatting
if: runner.os == 'Linux'
run: cargo fmt --all -- --check

- name: Check clippy
# not critical on other platforms, and slows down Windows
if: runner.os == 'Linux'
# Don't fail the build for clippy on nightly, since we get a lot of false-positives
run: cargo clippy --all --all-features --tests ${{ (matrix.rust_version != 'nightly' && '-- -D warnings') || '' }}

- name: Check licensing and duplicates in used crates
if: ${{ runner.os == 'Linux' && matrix.rust_version == 'stable' }}
uses: EmbarkStudios/cargo-deny-action@v1

- name: Check documentation
if: runner.os == 'Linux'
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: -D warnings

- name: Install cargo nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest

- name: Run tests with image tests
if: runner.os != 'macOS'
if: runner.os == 'macOS'
# TODO: Disallow retries in general once we can allow only after SIGABRT.
# See: https://github.com/nextest-rs/nextest/issues/1172
run: cargo nextest run --workspace --locked --no-fail-fast --retries 2 -j 4 --features imgtests,lzma,jpegxr
env:
XDG_RUNTIME_DIR: '' # dummy value, just to silence warnings about it missing

- name: Run tests without image tests
if: runner.os == 'macOS'
run: cargo nextest run --workspace --locked --no-fail-fast -j 4 --features lzma,jpegxr
env:
XDG_RUNTIME_DIR: '' # dummy value, just to silence warnings about it missing

- name: Upload images
if: failure()
uses: actions/upload-artifact@v3
with:
name: swf_images
path: |
tests*/**/*.actual*.png
tests*/**/*.difference*.png
check-required:
needs: changes
if: needs.changes.outputs.should_run == 'false'
Expand Down

0 comments on commit 9bf3a42

Please sign in to comment.