Initial import (history reset) #1
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: Update | |
on: | |
schedule: | |
- cron: "0 0 * * 1" | |
push: | |
branches: [main, master] | |
env: | |
CARGO_INCREMENTAL: 1 | |
CARGO_NET_RETRY: 10 | |
RUSTUP_MAX_RETRIES: 10 | |
CARGO_TERM_COLOR: always | |
CARGO_TERM_PROGRESS_WHEN: never | |
# logging: | |
CARGO_PLAYDATE_LOG: trace | |
# allow modify source for bindings generator: | |
PD_BUILD_PREBUILT: 1 | |
jobs: | |
pre-gen: | |
if: false # not ready yet | |
defaults: | |
run: | |
shell: bash | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
sdk: | |
- latest | |
features: | |
- --features=bindings-documentation,bindings-derive-debug | |
- --features=bindings-documentation,bindings-derive-default,bindings-derive-eq,bindings-derive-copy,bindings-derive-debug,bindings-derive-hash,bindings-derive-ord,bindings-derive-partialeq,bindings-derive-partialord | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache | |
uses: Swatinem/rust-cache@v1 | |
- name: Install Playdate SDK ${{ matrix.sdk }} | |
id: sdk | |
uses: pd-rs/get-playdate-sdk@main | |
with: | |
version: ${{ matrix.sdk }} | |
- name: SDK ${{ steps.sdk.outputs.version }} installed | |
run: which pdc && pdc --version | |
# TODO: check & stop if there's no changes or mb. save SDK version cached | |
- name: Host | |
run: | | |
cargo build -p=playdate-sys ${{ matrix.features }} -vv | |
cargo build -p=playdate-sys ${{ matrix.features }} --release | |
- name: Device | |
if: ${{ matrix.os }} == "ubuntu-latest" | |
run: | | |
cargo build -p=playdate-sys ${{ matrix.features }} --target=thumbv7em-none-eabihf | |
cargo build -p=playdate-sys ${{ matrix.features }} --target=thumbv7em-none-eabihf --release | |
- name: Format | |
run: rustfmt ./api/sys/gen/*.rs | |
- name: Test (dev) | |
run: | | |
cargo test -p=playdate-sys ${{ matrix.features }} --all-targets | |
cargo build -p=playdate-sys ${{ matrix.features }} --target=thumbv7em-none-eabihf -Zbuild-std=core,alloc | |
- name: Test (release) | |
run: | | |
cargo test -p=playdate-sys ${{ matrix.features }} --all-targets --release | |
cargo build -p=playdate-sys ${{ matrix.features }} --target=thumbv7em-none-eabihf -Zbuild-std=core,alloc --release | |
# TODO: build tests for --target=thumbv7em-none-eabihf with -Zbuild-std=core,alloc and mb. restricted-std | |
# TODO: compare, create PR |