Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mweirauch committed Jul 16, 2024
1 parent 16f3d22 commit 46722e9
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ jobs:
steps:
- name: Skip Check
id: skip_check
uses: fkirc/skip-duplicate-actions@v5
# uses: fkirc/skip-duplicate-actions@v5 # FIXME: doesn't work?
run: |
if [[ "${{ github.event_name }}" != 'pull_request' || "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.event.pull_request.base.repo.full_name }}" ]]; then
echo "should_skip=false" >> $GITHUB_ENV
else
echo "should_skip=true" >> $GITHUB_ENV
fi
lint:
name: Lint
Expand All @@ -32,7 +38,8 @@ jobs:
toolchain: stable
components: rustfmt

- uses: Swatinem/rust-cache@v2
- name: Set up cache
uses: Swatinem/rust-cache@v2

- name: Run cargo fmt
run: cargo fmt --all -- --check
Expand All @@ -43,10 +50,19 @@ jobs:
if: needs.check-duplicate-runs.outputs.should_skip != 'true'
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
include:
- name: Linux (x86_64)
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- name: MacOS (x86_64)
os: macos-latest
target: x86_64-apple-darwin
- name: MacOS (aarch64)
os: macos-latest
target: aarch64-apple-darwin
- name: Windows (x86_64)
os: windows-latest
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -56,6 +72,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
components: clippy

# - name: Cache cargo files
Expand All @@ -69,7 +86,8 @@ jobs:
# target/
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- uses: Swatinem/rust-cache@v2
- name: Set up cache
uses: Swatinem/rust-cache@v2

- name: Run cargo check
run: cargo check --all-targets
Expand Down

0 comments on commit 46722e9

Please sign in to comment.