Skip to content

Commit

Permalink
Add more actions
Browse files Browse the repository at this point in the history
Linting and test builds
  • Loading branch information
nakidai committed Jul 15, 2024
1 parent eeeed6f commit 879b559
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 11 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Lint
on: push

jobs:
rustfmt:
runs-on: ubuntu-latest

steps:
- name: Clone project
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Rustfmt
run: cargo fmt -- --check

clippy:
runs-on: ubuntu-latest

steps:
- name: Clone project
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Clippy
run: cargo clippy -- -D warnings
17 changes: 6 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,17 @@ jobs:
fail-fast: false
matrix:
include:
- build: linux-x86_64
os: ubuntu-latest
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- build: linux-aarch64
os: ubuntu-latest
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu

- build: macos-x86_64
os: macos-latest
- os: macos-latest
target: x86_64-apple-darwin
- build: macos-aarch64
os: macos-latest
- os: macos-latest
target: aarch64-apple-darwin

- build: windows-x86_64
os: windows-latest
- os: windows-latest
target: x86_64-pc-windows-msvc

steps:
Expand Down Expand Up @@ -67,4 +62,4 @@ jobs:
with:
generate_release_notes: true
files: |
${{ env.ASSET }}
${{ env.ASSET }}
42 changes: 42 additions & 0 deletions .github/workflows/testbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test build
on:
pull_request:
types: [opened, synchronize, reopened, edited, ready_for_review, review_requested]

jobs:
testbuild:
name: Test build
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu

- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin

- os: windows-latest
target: x86_64-pc-windows-msvc

steps:
- name: Clone project
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Build project
uses: actions-rs/cargo@v1.0.1
with:
use-cross: true
command: build
args: --verbose --release --target ${{ matrix.target }}

0 comments on commit 879b559

Please sign in to comment.