Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
5958ca2
new crate: rt-mock
boozook Apr 10, 2025
9d3bed0
`playdate-sys` refactoring (WiP)
boozook Apr 10, 2025
9766c58
remove old-fmt bindings
boozook Apr 10, 2025
750bef4
disable unnecessary test on update workflow
boozook Apr 10, 2025
125c2a4
bindgen: fix derive `Default`
boozook Apr 10, 2025
60e4a35
sys: fix pre-built not rebuilds when exists
boozook Apr 10, 2025
2f985a5
fix missed bumped version of bindgen
boozook Apr 10, 2025
7813e77
CI: disable auto-accept for update pr
boozook Apr 10, 2025
56947db
Update pre-built bindings (#544)
boozook Apr 10, 2025
b17b3f5
Update pre-built bindings (#545)
boozook Apr 10, 2025
749122c
sys: reorg panic module, other little things 🤏
boozook Apr 10, 2025
1587d7f
CI: add sys tests with mock and miri
boozook Apr 10, 2025
5eb1d6f
add missed cfg for miri, install rustup component
boozook Apr 10, 2025
1f91186
add missed permissions for jobs
boozook Apr 10, 2025
c2de818
"fix" docgen produces invalid md
boozook Apr 10, 2025
3d90139
rebuild pre-built bindings
boozook Apr 10, 2025
60a2213
sys: fix/opt build with mock
boozook Apr 10, 2025
e2149ec
Update pre-built bindings (#546)
boozook Apr 10, 2025
439b800
~ upd lock
boozook Apr 10, 2025
c99803e
mock: update bindings
boozook Apr 10, 2025
f4e9e63
CI: add tests of the mock
boozook Apr 10, 2025
475b15f
CI: fix - add missed `miri` component
boozook Apr 10, 2025
5930c43
fmt mock-bindings
boozook Apr 10, 2025
1df42b7
Merge branch 'main' into api-refactoring
boozook Apr 11, 2025
f044d78
Merge branch 'main' into api-refactoring
boozook Apr 11, 2025
16f2d27
bindgen: predefine derives, feature-gate unstable derives, remove leg…
boozook Apr 13, 2025
c19ed9e
sys: fix features, prepare to remove legacy features, use predefined …
boozook Apr 13, 2025
06988af
Automated build pre-built bindings for 2.6.2 on macOS-ARM64 with feat…
boozook Apr 13, 2025
0875f9c
Automated build pre-built bindings for 2.6.2 on Linux-X64 with featur…
boozook Apr 13, 2025
4990736
Automated build pre-built bindings for 2.6.2 on Windows-X64 with feat…
boozook Apr 13, 2025
82fb09a
Automated bump sys crate version
boozook Apr 13, 2025
ba4ecd7
CI: fix features
boozook Apr 13, 2025
7273a39
Merge pull request #551 from boozook/api/sys/pre-build/refactoring/fe…
boozook Apr 13, 2025
dcf7d36
Merge pull request #550 from boozook/refactoring/features-bindings-de…
boozook Apr 13, 2025
b6289bb
Merge branch 'main' into api-refactoring
boozook Apr 13, 2025
2ee4f21
bindgen: fix deriving `Hash` for api-endpoints
boozook Apr 14, 2025
8e041eb
bindgen: fix deriving `ConstParamTy` for complex structs
boozook Apr 14, 2025
0c84fa5
sys: make `fmt` public
boozook Apr 14, 2025
12e3475
sys: improve build - err msg about missed pre-built
boozook Apr 14, 2025
c5f5be5
sys: rem pre-built, prepare for re-gen
boozook Apr 14, 2025
35f2668
sys: reduce features - rid of unnecessary features which needs transi…
boozook Apr 14, 2025
068732d
CI: reduce features of `sys` and transitive
boozook Apr 14, 2025
b218014
CI: exclude doc- & examples- tests for `sys` on host
boozook Apr 14, 2025
ca79b39
Update pre-built bindings (#553)
boozook Apr 14, 2025
621df8b
Update Cargo.lock
boozook Apr 14, 2025
f5faca8
bindgen: exclude field as unuseful or unimplemented (4 mock) (WiP)
boozook Apr 14, 2025
4dfe5f4
test derive-mask ordering
boozook Apr 17, 2025
f51f89c
fs: rewrite partially, remove redundant allocations, implement scoped…
boozook Apr 17, 2025
e2f19a0
sys: fix realloc when allocator copies zeros `old -> new`
boozook Apr 17, 2025
53dc51d
Fix realloc - when allocator copies zeros `old -> new` (#556)
boozook Apr 17, 2025
e16b7a6
sys: fix doc-comment refs (following #556)
boozook Apr 17, 2025
3c11563
Refactor `'playdate-fs` - redundant allocations, scoped endpoint (#555)
boozook Apr 17, 2025
bd890f5
fs: improve readme
boozook Apr 18, 2025
ea064e6
color: refactoring, impl `LCDColor` with lifetime preserving for for …
boozook Apr 18, 2025
1727809
fs: fix `std` double negation
boozook Apr 18, 2025
7d69f00
sys: add null-ptr error, small improvements (conversions, build-script)
boozook Apr 18, 2025
4f18d2a
CI: reorganize api tests, add miri tests for all api-crates (#557)
boozook Apr 18, 2025
0d3c6ef
fs: fix doctests
boozook Apr 18, 2025
40a2658
color: improve tests
boozook Apr 19, 2025
8c29fac
display: refactoring
boozook Apr 19, 2025
5ad262e
improve documentation
boozook Apr 19, 2025
3aa7ca4
display: (metadata) add no-alloc category
boozook Apr 19, 2025
faa3fee
ctrl: refactoring
boozook Apr 20, 2025
a3b7142
system: refactoring (WiP), other small fixes
boozook Apr 20, 2025
2705db8
various small fixes, improve documentation
boozook Apr 20, 2025
1b6363c
merge `ctrl` crate into `system`
boozook Apr 21, 2025
c09f623
add plug for removed crate `playdate-controls`
boozook Apr 21, 2025
905d84e
system::time: refactoring
boozook Apr 21, 2025
644cd1e
update vet
boozook Apr 21, 2025
a1725af
continue removing `playdate-controls`
boozook Apr 21, 2025
cfa3e43
ctrl: mark crate as deprecated
boozook Apr 21, 2025
36e72d6
Merge branch 'main' into api-refactoring
boozook Apr 27, 2025
54b811d
Merge branch 'api-refactoring' of github.com:boozook/playdate into ap…
boozook Apr 29, 2025
5c840f5
sys: allocator double-free fix
boozook Apr 29, 2025
f55d856
Automated build pre-built bindings for 2.7.2 on macOS-ARM64 with feat…
dependabot[bot] May 5, 2025
08326ef
Automated build pre-built bindings for 2.7.2 on Windows-X64 with feat…
dependabot[bot] May 5, 2025
7df6630
Automated bump sys crate version
dependabot[bot] May 5, 2025
9fe1496
Merge pull request #559 from boozook/api/sys/pre-build/api-refactoring
boozook May 6, 2025
c333ff7
Automated build pre-built bindings for 2.7.2 on Linux-X64 with featur…
dependabot[bot] May 6, 2025
21e7514
Automated bump sys crate version
dependabot[bot] May 6, 2025
29b07ab
Merge pull request #560 from boozook/api/sys/pre-build/api-refactoring
boozook May 6, 2025
b2a1690
Merge branch 'main' into api-refactoring
boozook May 6, 2025
cc6876b
add minimal basic callbacks implementation 🎉
boozook May 9, 2025
1055ae3
CI: add callbacks to tests
boozook May 9, 2025
cdc9295
add diagnostics, rem `proto` module
boozook May 9, 2025
18a44fe
Minimal basic callbacks implementation 🎉 (#561)
boozook May 9, 2025
50cffff
sys: add tracing for allocator and rt-stack-size
boozook May 11, 2025
129c740
add callbacks to workspace deps
boozook May 11, 2025
96592e1
sys: improve `trace` macro
boozook May 11, 2025
9f18940
system: callbacks (WiP)
boozook May 12, 2025
2f22bc2
upd deps
boozook May 12, 2025
b7d5d54
sys: small docs and `UpdateDisplayCtrl` improvements
boozook May 16, 2025
31fbf14
system: all is rewritten, fixed primitive types, implemented callback…
boozook May 16, 2025
6f86639
workspace: add lint, tracing for profiles
boozook May 16, 2025
d89b1cc
gfx: add todo opt-note
boozook May 16, 2025
1051a39
callbacks: add missed derives for `Key` & `FnLoc`, improve tracing
boozook May 16, 2025
84597ea
callbacks: fix miss-specialized fn-type
boozook May 16, 2025
e5b414a
callbacks: improve tracing
boozook May 16, 2025
b168725
callbacks: impl global storage for __one__ unique type per key, where…
boozook May 16, 2025
da8941c
CI: add missed cargo feature `profile-rustflags`
boozook May 16, 2025
95d579b
CI: add missed config preparation
boozook May 16, 2025
17cf3fc
CI: add missed config preparation for tests
boozook May 16, 2025
d51d26b
sys: allow lint - bindgen's "unnecessary transmutes" in const- layout…
boozook May 16, 2025
70a6a26
sys: remove unnecessary trace cases
boozook May 16, 2025
03becdf
color: missed `IntoColor` impl
boozook May 18, 2025
030a57d
meta: add maintenance badges
boozook May 19, 2025
a503579
fs: remove unnecessary `Unknown` error
boozook May 19, 2025
c9136a0
gfx: rewrite (bitmap, table, tilemap, video, error)
boozook May 19, 2025
58dddce
gfx: rewrite mostly complete
boozook May 20, 2025
328f53f
system: improve `prelude`
boozook May 20, 2025
51fa1da
menu: rewrite, reduce allocations
boozook May 22, 2025
65d7d64
update deps, small fixes
boozook May 22, 2025
359b28e
~ fmt
boozook May 22, 2025
4de0adb
upd `rt-target-test`
boozook May 22, 2025
bff219f
lua: fixes
boozook May 22, 2025
c767226
dev- pre-built bindings
boozook May 22, 2025
af6279f
gfx: fixed leak in `Bitmap::mask` and potential UB
boozook May 24, 2025
aeb1973
sys: restore `AsRaw` trait
boozook May 24, 2025
de90277
fs: impl `AsRaw` trait for `File`
boozook May 24, 2025
0302527
menu: const impl `Deref`
boozook May 24, 2025
f249040
minor changes
boozook May 24, 2025
b4dcead
relax lints for the mock
boozook May 24, 2025
d7bb830
CI: temporary disabled some miri tests
boozook May 24, 2025
e6a7836
menu: better fs-layout
boozook Jun 2, 2025
98fa67c
gfx: impl const `AsRef` & `AsRaw`
boozook Jun 2, 2025
1d3de69
sys: better `AsRaw`, `Cod` and `IntoCod`
boozook Jun 2, 2025
481388e
system: improve `time` primitives
boozook Jun 2, 2025
2918228
system: ~ improve examples
boozook Jun 2, 2025
cbd521d
fs: impl traits of `portable-io` & `no_std_io2` for `File`
boozook Jun 21, 2025
d47783b
Merge branch 'main' into api-refactoring
boozook Jul 2, 2025
bfdf43f
CI: before suggestions restore lock file
boozook Jul 2, 2025
04a2d07
fix workspace manifest features
boozook Jul 2, 2025
269a08e
update toolchain
boozook Jul 2, 2025
9a51711
Merge branch 'api-refactoring' into refactoring/bindgen-exclude
boozook Jul 11, 2025
2d3b890
Merge pull request #554 from boozook/refactoring/bindgen-exclude
boozook Jul 11, 2025
7d57c67
cargo: update cargo (closes #489), remove `new`&`init` commands,
boozook Jul 26, 2025
a5e7e88
bindgen: update deps
boozook Jul 26, 2025
79c25d1
playdate-device: fix & update
boozook Jul 27, 2025
f99d68c
bindgen: fix `markup5ever_rcdom` version
boozook Jul 27, 2025
37e9bc6
playdate-build: fix resolver
boozook Jul 27, 2025
23f524e
sys: fix for edition '24
boozook Jul 27, 2025
3fc718e
callbacks: fixes for edition '24
boozook Jul 27, 2025
8e1920b
various fixes, also for edition '24
boozook Jul 27, 2025
cd2a37b
Update pre-built bindings (#566)
boozook Jul 27, 2025
9922cfd
remove stabilized features
boozook Feb 1, 2026
3e6bd35
update deps and nightly features usage
boozook Feb 1, 2026
05c71b4
Merge branch 'main' into api-refactoring
boozook Feb 1, 2026
88a9e9d
renamed README-files to distinguish them from non-crate's/vcs/etc. RE…
boozook Feb 15, 2026
4ac7ba6
update cargo deps, remove cargo's `build-plan`
boozook Feb 15, 2026
f78f6b4
update lints, manifests
boozook Feb 22, 2026
a5fb47c
add new target package
boozook Feb 22, 2026
a95b834
bindgen: use new target package, add controllable rename & patch
boozook Feb 22, 2026
d7150c9
update wax dep
boozook Feb 22, 2026
cf10903
sys: use bindgen's `rename` & `patch`, add env cfg vars
boozook Feb 22, 2026
690369d
sys: remove stack-depth trace, that was terrible impl
boozook Feb 22, 2026
8f39c9c
sys: eh/entry-point (`eventHandlerShim`) is naked now for hw target
boozook Feb 22, 2026
695d743
small fixes 🤏
boozook Feb 22, 2026
c4ac6b2
tune target, still WiP, need proper tests
boozook Feb 28, 2026
035ab3a
target: extract funcs which common for both of build and src
boozook Feb 28, 2026
4daf2d0
fix toolchain version
boozook Feb 28, 2026
84738d5
rem stabilized `assert_matches`, share some deps to workspace level
boozook Feb 28, 2026
adabeab
refactor injecting compat-module with aliases for renamed types
boozook Feb 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 5 additions & 1 deletion .github/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[unstable]
unstable-options = true
config-include = true
# check-cfg = true # TODO: enable after stabilized definition
panic-abort-tests = true
mtime-on-use = true
avoid-dev-deps = true
profile-rustflags = true


[env]
MIRIFLAGS = "-Zmiri-symbolic-alignment-check -Zmiri-track-alloc-accesses -Zmiri-unique-is-unique -Zmiri-tree-borrows -Zmiri-strict-provenance"
6 changes: 2 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ jobs:
env:
CRATES: >-
-p=playdate-color
-p=playdate-controls
-p=playdate-display
-p=playdate-fs
-p=playdate-graphics
Expand All @@ -173,7 +172,7 @@ jobs:
-p=playdate-sprite
-p=playdate-system
-p=playdate
FEATURES: --features=bindings-derive-debug,sys/bindings-documentation,sys/error-ctx
FEATURES: --all-features
run: >-
cargo llvm-cov test ${{ env.CRATES }}
--lib --tests --no-default-features
Expand All @@ -183,7 +182,7 @@ jobs:
--lcov --output-path api-no-default.lcov.info

cargo llvm-cov test ${{ env.CRATES }}
--lib --tests --no-default-features ${{ env.FEATURES }}
--lib --tests ${{ env.FEATURES }}
--no-fail-fast --ignore-rust-version --include-ffi
--remap-path-prefix --show-instantiations
--branch --mcdc
Expand Down Expand Up @@ -212,7 +211,6 @@ jobs:
if: ""
env:
CRATES: -p=cargo-playdate
RUSTFLAGS: --cfg init_tests
run: >-
cargo llvm-cov test ${{ env.CRATES }}
--bins --examples --all-targets --lib --tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
continue-on-error: true
run: >-
cargo build --bin=pdbindgen --no-default-features
--features=cli,documentation,extra-codegen,logging,pretty-please,which-rustfmt,runtime
--features=cli,documentation,extra-codegen,logging,pretty,runtime
- name: Upload
uses: actions/upload-artifact@v4
with:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ jobs:
continue-on-error: true
run: rustup target add x86_64-apple-darwin


- name: prepare names
id: names
shell: bash
Expand All @@ -77,12 +76,10 @@ jobs:
echo "suffix=${{ (runner.os == 'Windows' && format('-{0}', runner.arch)) || format('-{0}-{1}', runner.os, runner.arch) }}" >> "$GITHUB_OUTPUT"
echo "full=${{ (runner.os == 'Windows' && format('-{0}.exe', runner.arch)) || format('-{0}-{1}', runner.os, runner.arch) }}" >> "$GITHUB_OUTPUT"


- name: prepare dir
shell: bash
run: mkdir -p target/upload


- name: symbolizer ${{ runner.os == 'macOS' && '(both targets)' || '' }}
id: symbolizer
continue-on-error: true
Expand Down Expand Up @@ -115,7 +112,7 @@ jobs:
continue-on-error: true
run: >-
cargo build --release --bin=pdbindgen --no-default-features
--features=cli,documentation,extra-codegen,logging,pretty-please,which-rustfmt,runtime
--features=cli,documentation,extra-codegen,logging,pretty,runtime

- name: bindgen to upload
if: steps.bindgen.outcome == 'success' && runner.os != 'macOS'
Expand All @@ -132,7 +129,6 @@ jobs:
shell: bash
run: cp target/release/cargo-playdate${{ steps.names.outputs.ext }} target/upload/cargo-playdate${{ steps.names.outputs.full }}


- name: merge universal
if: runner.os == 'macOS'
continue-on-error: true
Expand Down Expand Up @@ -160,7 +156,6 @@ jobs:
retention-days: 1
overwrite: false


build-universal:
continue-on-error: true
name: Build (macos-12)
Expand Down Expand Up @@ -191,7 +186,7 @@ jobs:
continue-on-error: true
run: >-
cargo build --release --bin=pdbindgen
--features=cli,documentation,extra-codegen,logging,pretty-please,which-rustfmt,runtime
--features=cli,documentation,extra-codegen,logging,pretty,runtime
--no-default-features
# fallback: if build fails => upload downloaded build:
- if: steps.bindgen.outcome == 'failure'
Expand Down
230 changes: 201 additions & 29 deletions .github/workflows/tests-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,32 @@ env:
RUSTUP_MAX_RETRIES: 10
CARGO_TERM_COLOR: always
CARGO_TERM_PROGRESS_WHEN: never
MIRIFLAGS: -Zmiri-symbolic-alignment-check -Zmiri-track-alloc-accesses -Zmiri-unique-is-unique -Zmiri-tree-borrows -Zmiri-strict-provenance

jobs:
# Final no-op job as result of all deps-jobs, needed as finalisation step of complex/dynamic matrix.
success:
needs: sys
Success:
name: Done
permissions:
contents: read
needs:
- Sys
- Mock
- Sys-Mock
- Sys-Miri
- Crates
runs-on: ubuntu-latest
steps:
- name: success
run: "true"

sys:
Sys:
name: >-
Sys (${{ matrix.os.name }}${{ matrix.bindgen.install && ' +bindgen' || '' }})
${{ matrix.bindgen.features }}
${{ matrix.features }}
permissions:
contents: read
env:
FEATURES_1: bindgen-runtime
FEATURES_2: bindgen-runtime,bindings-derive-debug
FEATURES_3: bindgen-runtime,bindings-derive-debug,sys/bindings-documentation,sys/error-ctx
BUILD_STD_ARGS: -Zbuild-std=core,alloc --target=thumbv7em-none-eabihf
defaults:
run:
Expand All @@ -47,26 +54,17 @@ jobs:
matrix:
os:
- { name: mac, key: macos-14 }
- { name: win, key: windows-latest }
- { name: linux, key: ubuntu-latest }
- { name: win, key: windows-latest }
sdk:
- ${{ inputs.sdk || 'latest' }}
features:
- "" # default
- bindgen
- alloc,lang-items,allocator-api,const-types
bindgen:
- install: false
- install: false
features: bindings-derive-debug
- install: false
features: bindgen-runtime
- install: false
features: bindgen-runtime,bindings-derive-debug
- install: true
- install: true
features: bindings-derive-debug
- install: true
features: bindgen-runtime
- install: true
features: bindgen-runtime,bindings-derive-debug

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -87,18 +85,192 @@ jobs:
win: ${{ secrets.SDK_BETA_WINDOWS }}
linux: ${{ secrets.SDK_BETA_LINUX }}

- name: SDK ${{ steps.sdk.outputs.version }} installed
run: which pdc && pdc --version

- name: Test (host)
run: cargo test -p=playdate-sys --features=${{ matrix.bindgen.features }} -- --nocapture
run: cargo test -p=playdate-sys --lib --features=${{ matrix.features }} -- --nocapture

- name: Build (host)
run: |
cargo build -p=playdate-sys --features=${{ matrix.bindgen.features }} --example=hello-world --features=lang-items
cargo build -p=playdate-sys --features=${{ matrix.bindgen.features }} --example=handler --features=lang-items,entry-point
cargo build -p=playdate-sys --features=${{ matrix.features }} --example=hello-world --features=lang-items
cargo build -p=playdate-sys --features=${{ matrix.features }} --example=handler --features=lang-items,entry-point

- name: Build (device)
run: |
cargo build -p=playdate-sys --features=${{ matrix.bindgen.features }} ${{ env.BUILD_STD_ARGS }} --example=hello-world --features=lang-items
cargo build -p=playdate-sys --features=${{ matrix.bindgen.features }} ${{ env.BUILD_STD_ARGS }} --example=handler --features=lang-items,entry-point
cargo build -p=playdate-sys --features=${{ matrix.features }} ${{ env.BUILD_STD_ARGS }} --example=hello-world --features=lang-items
cargo build -p=playdate-sys --features=${{ matrix.features }} ${{ env.BUILD_STD_ARGS }} --example=handler --features=lang-items,entry-point

Sys-Miri:
name: "Sys: Miri"
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}

- name: Config
uses: ./.github/actions/init-cfg

- name: Install miri
run: rustup component add miri

- name: Test (host)
run: cargo miri test --lib -p=playdate-sys --features=lang-items

- name: Test (host, all-features)
run: cargo miri test --lib -p=playdate-sys --all-features

- name: Run (host)
run: |
cargo miri run -p=playdate-sys --example=hello-world-bin --features=lang-items
cargo miri run -p=playdate-sys --example=handler-bin --features=lang-items,entry-point

- name: Run (device)
run: |
cargo miri run -p=playdate-sys --example=hello-world-bin --features=lang-items --target=thumbv7em-none-eabihf
cargo miri run -p=playdate-sys --example=handler-bin --features=lang-items,entry-point --target=thumbv7em-none-eabihf

Sys-Mock:
name: "Sys: Mock"
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}

- name: Config
uses: ./.github/actions/init-cfg

- name: Test (mock on alloc)
env:
RUSTFLAGS: --cfg mockrt="alloc"
run: cargo test --lib -p=playdate-sys --features=lang-items

- name: Test (mock on std)
env:
RUSTFLAGS: --cfg mockrt="std"
run: cargo test --lib -p=playdate-sys --features=lang-items

Mock:
name: >-
Mock (${{ matrix.os.name }})
${{ matrix.features }}
permissions:
contents: read
defaults:
run:
shell: bash
runs-on: ${{ matrix.os.key }}
strategy:
fail-fast: false
matrix:
os:
- { name: mac, key: macos-14 }
- { name: win, key: windows-latest }
- { name: linux, key: ubuntu-latest }
features:
- default
- sim
- std

steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}

- name: Config
uses: ./.github/actions/init-cfg

- name: Test
run: cargo test -p=playdate-sys-mock --features=${{ matrix.features }}

- name: Install miri
run: rustup component add miri

- name: Test (miri)
run: cargo miri test -p=playdate-sys-mock --features=${{ matrix.features }}

# sys-dependers and other api-crates:
Crates:
name: ${{ matrix.crate.name }} (${{ matrix.os.name }}, ${{ matrix.features.name }} features)
permissions:
contents: read
env:
BUILD_STD_ARGS: -Zbuild-std=core,alloc --target=thumbv7em-none-eabihf
defaults:
run:
shell: bash
runs-on: ${{ matrix.os.key }}
strategy:
fail-fast: false
matrix:
os:
- { name: mac, key: macos-14 }
- { name: linux, key: ubuntu-latest }
- { name: win, key: windows-latest }
sdk:
- ${{ inputs.sdk || 'latest' }}
crate:
- name: playdate-color
miri-flags: -Zmiri-symbolic-alignment-check -Zmiri-track-alloc-accesses -Zmiri-report-progress -Zmiri-backtrace=full -Zmiri-permissive-provenance
- name: playdate-callback
- name: playdate-display
- name: playdate-fs
- name: playdate-graphics
- name: playdate-menu
- name: playdate-scoreboards
- name: playdate-sound
- name: playdate-sprite
- name: playdate-system
- name: playdate
features:
- { arg: "", name: default }
- { arg: --all-features, name: all }
- { arg: --no-default-features, name: "no" }
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}

- name: Config
uses: ./.github/actions/init-cfg

- name: Install bindgen
if: inputs.ref || (matrix.sdk != 'latest')
uses: ./.github/actions/install-bindgen

- name: Install SDK (${{ matrix.sdk }})
uses: ./.github/actions/install-sdk
with:
version: ${{ matrix.sdk }}
mac: ${{ secrets.SDK_BETA_MACOS }}
win: ${{ secrets.SDK_BETA_WINDOWS }}
linux: ${{ secrets.SDK_BETA_LINUX }}

- name: Build (host)
run: cargo build -p=${{ matrix.crate.name }} ${{ matrix.features.arg }} --examples --lib

- name: Build (device)
run: cargo build -p=${{ matrix.crate.name }} ${{ matrix.features.arg }} ${{ env.BUILD_STD_ARGS }} --examples --lib

- name: Test
run: cargo test -p=${{ matrix.crate.name }} ${{ matrix.features.arg }}

- name: Install miri
if: matrix.crate.miri-flags
run: rustup component add miri

- name: Test (miri)
if: matrix.crate.miri-flags
env:
# MIRIFLAGS: ${{ matrix.crate.miri-flags || env.MIRIFLAGS }}
MIRIFLAGS: ${{ matrix.crate.miri-flags }}
run: cargo miri test -p=${{ matrix.crate.name }} ${{ matrix.features.arg }}
Loading
Loading