Skip to content

Commit

Permalink
Create ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
t-moe authored Dec 2, 2024
1 parent 6392bff commit 423af81
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# This action builds* all the pushes to master, staging and trying which are required for bors.
# Additionally it builds* for each PR.
#
# * builds includes building, checking, testing, checking format and clippy, as well as the changelog.

on:
push:
branches: [master, staging, trying]
pull_request:
merge_group:

# Cancel any currently running workflows from the same PR, branch, or
# tag when a new workflow is triggered.
#
# https://stackoverflow.com/a/66336834
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

name: Run CI

jobs:
check:
name: Check
strategy:
matrix:
os:
- ubuntu-latest
#- windows-latest
#- macos-14

runs-on: ${{ matrix.os }}

env:
VCPKGRS_DYNAMIC: 1 # Use dynamic linking on Windows build (vcpkg)

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Cache Dependencies
uses: Swatinem/[email protected]

- name: Run cargo check
run: cargo check --all-features --locked

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Run cargo fmt
run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Cache Dependencies
uses: Swatinem/[email protected]

- name: Run cargo clippy
run: cargo clippy --locked -- -D warnings

0 comments on commit 423af81

Please sign in to comment.