Update main.yml #124
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
name: CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
merge_group: | |
types: [checks_requested] | |
schedule: | |
# Runs at 02:30, every Saturday | |
- cron: "30 2 * * 6" | |
jobs: | |
Test: | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: [stable, nightly] | |
platform: | |
- { target: aarch64-apple-darwin, os: macos-14 } | |
- { target: x86_64-apple-darwin, os: macos-13 } | |
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest } | |
- { target: aarch64-unknown-linux-gnu, os: ubuntu-latest } | |
- { target: x86_64-pc-windows-msvc, os: windows-latest } | |
runs-on: ${{ matrix.platform.os }} | |
env: | |
HARFBUZZ_SYS_NO_PKG_CONFIG: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
target: ${{ matrix.platform.target }} | |
- name: Install packages | |
if: ${{ matrix.platform.os == 'ubuntu-latest' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libegl1-mesa-dev libgtk-3-dev libsdl2-dev cmake | |
- name: Build | |
run: cargo build --target ${{ matrix.platform.target }} | |
- name: Test | |
if: ${{ matrix.platform.target != 'aarch64-unknown-linux-gnu' }} | |
run: cargo test | |
build_result: | |
name: Result | |
runs-on: ubuntu-latest | |
needs: | |
- "Test" | |
steps: | |
- name: Mark the job as successful | |
run: exit 0 | |
if: success() | |
- name: Mark the job as unsuccessful | |
run: exit 1 | |
if: "!success()" |