1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-05-17 00:17:46 +00:00
kawari/.github/workflows/main.yml

51 lines
1.2 KiB
YAML

name: Main
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache-deps
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --release --verbose --no-default-features
- name: Run clippy
run: cargo clippy --no-default-features
- name: Run tests
run: cargo test --verbose --no-default-features
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-package
path: |
target/release/kawari-admin*
target/release/kawari-frontier*
target/release/kawari-lobby*
target/release/kawari-login*
target/release/kawari-patch*
target/release/kawari-web*
!target/release/*.d
if-no-files-found: error