-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2afe4c9
Showing
167 changed files
with
96,443 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
post: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: rzr/fediverse-action@master | ||
with: | ||
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
name: Tests | ||
on: | ||
pull_request: | ||
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: | ||
RUST_LOG: trace | ||
CARGO_PLAYDATE_LOG: trace | ||
|
||
jobs: | ||
api: | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
- windows-latest | ||
sdk: | ||
- latest | ||
|
||
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 | ||
|
||
- name: Install cargo-action-fmt | ||
uses: baptiste0928/[email protected] | ||
with: | ||
crate: cargo-action-fmt | ||
|
||
- name: Test Crates | ||
run: | | ||
FEATURES_1=bindgen-runtime | ||
FEATURES_2=bindgen-runtime,bindings-derive-debug,error-ctx | ||
FEATURES_3=bindgen-runtime,bindings-derive-debug,bindings-documentation | ||
cargo test -p=playdate-sys -- --nocapture | ||
cargo test -p=playdate-sys --features=$FEATURES_1 -- --nocapture | ||
cargo test -p=playdate-sys --features=$FEATURES_2 -- --nocapture | ||
cargo test -p=playdate-sys --features=$FEATURES_3 -- --nocapture | ||
cargo test -p=playdate-fs --lib --no-default-features --features=$FEATURES_1 -- --nocapture | ||
cargo test -p=playdate-fs --lib --no-default-features --features=$FEATURES_2 -- --nocapture | ||
cargo test -p=playdate-fs --lib --no-default-features --features=$FEATURES_3 -- --nocapture | ||
cargo test -p=playdate-sound --lib --no-default-features --features=$FEATURES_1 -- --nocapture | ||
cargo test -p=playdate-sound --lib --no-default-features --features=$FEATURES_2 -- --nocapture | ||
cargo test -p=playdate-sound --lib --no-default-features --features=$FEATURES_3 -- --nocapture | ||
cargo test -p=playdate-color --lib --no-default-features --features=$FEATURES_1 -- --nocapture | ||
cargo test -p=playdate-color --lib --no-default-features --features=$FEATURES_2 -- --nocapture | ||
cargo test -p=playdate-color --lib --no-default-features --features=$FEATURES_3 -- --nocapture | ||
cargo test -p=playdate-controls --lib --no-default-features --features=$FEATURES_1 -- --nocapture | ||
cargo test -p=playdate-controls --lib --no-default-features --features=$FEATURES_2 -- --nocapture | ||
cargo test -p=playdate-controls --lib --no-default-features --features=$FEATURES_3 -- --nocapture | ||
- name: Examples | ||
run: | | ||
FEATURES=bindgen-runtime,bindings-derive-debug | ||
cargo build --target=thumbv7em-none-eabihf -p=playdate-fs --examples --features=$FEATURES -Zbuild-std | ||
cargo build --target=thumbv7em-none-eabihf -p=playdate-controls --examples --features=$FEATURES -Zbuild-std | ||
cargo build --target=thumbv7em-none-eabihf -p=playdate-color --examples --features=$FEATURES -Zbuild-std | ||
cargo build --target=thumbv7em-none-eabihf -p=playdate-sound --examples --features=$FEATURES -Zbuild-std | ||
# Imitate docs.rs environment | ||
- name: Test in no-sdk environment | ||
env: | ||
DOCS_RS: 1 | ||
PLAYDATE_SDK_PATH: 0 | ||
IGNORE_EXISTING_PLAYDATE_SDK: 1 | ||
run: | | ||
cargo doc -p=playdate-sys -v --target=thumbv7em-none-eabihf --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 | ||
tools: | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
- windows-latest | ||
sdk: | ||
- latest | ||
|
||
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 | ||
|
||
- name: Install cargo-action-fmt | ||
uses: baptiste0928/[email protected] | ||
with: | ||
crate: cargo-action-fmt | ||
|
||
- name: Test Utils | ||
run: | | ||
cargo test -p=playdate-build-utils --all-features | ||
cargo test -p=playdate-build --all-features | ||
cargo test -p=playdate-tool --all-features | ||
- name: Check | ||
run: | | ||
cargo check -p=cargo-playdate -q --message-format=json | cargo-action-fmt | ||
cargo test -p=cargo-playdate --no-run -q --message-format=json | cargo-action-fmt | ||
- name: Test | ||
run: | | ||
cargo test -p=cargo-playdate -- --nocapture | ||
- name: Install | ||
run: | | ||
cargo install -p=cargo-playdate --debug | ||
- name: Examples | ||
run: | | ||
FEATURES=bindgen-runtime,bindings-derive-debug | ||
cargo playdate package --simulator --device -p=playdate-sys --examples | ||
cargo playdate package --simulator --device -p=playdate-fs --examples | ||
cargo playdate package --simulator --device -p=playdate-controls --examples | ||
cargo playdate package --simulator --device -p=playdate-color --examples | ||
cargo playdate package --simulator --device -p=playdate-sound --examples | ||
# TODO: build crankstart with examples for compatibility test | ||
|
||
format: | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Check | ||
run: cargo fmt -- --check |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/target | ||
cargo/tests/crates/**/target | ||
cargo/tests/crates/**/Cargo.lock |
Oops, something went wrong.