Skip to content

update CI

update CI #118

Workflow file for this run

name: CI

Check failure on line 1 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yaml

Invalid workflow file

invalid `cron` attribute "0 0 1 *"
on:
schedule:
- cron: "0 0 1 *"
push:
branches: [ staging, trying, master ]
pull_request:
jobs:
ci:
name: CI
runs-on: ubuntu-latest
needs: [build, test, test-native]
steps:
- name: Done
run: exit 0
build:
name: Build
strategy:
matrix:
include:
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: x86_64-apple-darwin, os: macos-latest }
- { target: aarch64-apple-darwin, os: macos-latest }
- { target: x86_64-pc-windows-msvc, os: windows-latest }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
targets: ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }} --release
env:
RUSTFLAGS: -D warnings
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Print enabled target features
run: rustc --print=cfg -C target-cpu=native
- run: cargo test
env:
RUST_BACKTRACE: 1
test-native:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Print enabled target features
run: rustc --print=cfg -C target-cpu=native
- run: cargo test
env:
RUST_BACKTRACE: 1
RUSTFLAGS: -C target-cpu=native