-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: create ci workflow with new github actions configuration
- add a new github actions file for ci - define steps for fmt, clippy, test, and build jobs in the ci workflow - modify the `parley` import in `src/shaper.rs` for better visibility - update font settings in `src/test.rs` for `monospace xenon var regular` font styling
- Loading branch information
Showing
3 changed files
with
120 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- ci | ||
|
||
jobs: | ||
fmt: | ||
name: cargo fmt | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
toolchain: [stable, nightly] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: install stable toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
components: rustfmt | ||
|
||
- name: cargo fmt | ||
run: cargo fmt --all --check | ||
|
||
clippy: | ||
name: cargo clippy | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: restore cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: install toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
components: clippy | ||
|
||
- name: Show toolchain info | ||
run: cargo --version --verbose | ||
|
||
- name: Run Clippy | ||
run: cargo clippy --all-targets -- -D warnings | ||
continue-on-error: ${{ matrix.toolchain == 'nightly' }} | ||
|
||
event-upload: | ||
needs: test | ||
name: Upload Test Event | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-event | ||
path: ${{ github.event_path }} | ||
|
||
test: | ||
name: cargo test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: restore cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: install stable toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
|
||
- name: cargo test | ||
run: cargo test --workspace --locked --all-features | ||
|
||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Build | ||
run: cargo build --locked --release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters