1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-04-19 22:36:49 +00:00
kawari/.github/workflows/main.yml

81 lines
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') }}
- uses: robinraju/release-downloader@v1
if: runner.os == 'Linux'
with:
repository: 'WorkingRobot/OodleUE'
fileName: 'gcc.zip'
latest: true
extract: true
- if: runner.os == 'Linux'
run: |
mkdir oodle
cp lib/Release/liboodle-network-shared.so oodle/
- uses: robinraju/release-downloader@v1
if: runner.os == 'Windows'
with:
repository: 'WorkingRobot/OodleUE'
fileName: 'clang-cl.zip'
latest: true
extract: true
- if: runner.os == 'Windows'
run: |
mkdir oodle
cp ar/Release/oodle-network-shared.lib oodle/
- name: Build
run: cargo build --release --verbose --features oodle
- name: Run clippy
run: cargo clippy --features oodle
- name: Run tests
run: cargo test --verbose --features oodle
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-package
path: |
LICENSE
USAGE.md
README.md
Caddyfile
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/kawari-world*
!target/release/*.d
resources/
!resources/tests
scripts/
if-no-files-found: error