Skip to content

* playdate-build refactoring #77

* playdate-build refactoring

* playdate-build refactoring #77

Workflow file for this run

name: Dev
on:
workflow_dispatch:
inputs:
source:
description: "Source ref used to build bindings. Uses `github.ref`` by default."
required: false
sha:
description: "Source SHA used to build bindings. Uses `github.sha`` by default."
required: false
push:
branches: [dev*, refactor*, dev/**, refactor/**]
env:
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
CARGO_TERM_COLOR: always
CARGO_TERM_PROGRESS_WHEN: never
CARGO_INCREMENTAL: 1
# logging:
RUST_LOG: trace
CARGO_PLAYDATE_LOG: trace
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-14
- ubuntu-latest
- windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.source || github.ref || github.event.ref }}
- name: Cache
uses: actions/cache@v4
with:
path: |
target/
~/.cargo
key: ${{ runner.os }}-dev-build-${{ hashFiles('Cargo.lock') }}
- name: Config
run: |
mkdir -p .cargo
cp -rf .github/config.toml .cargo/config.toml
- name: Install Deps
uses: ./.github/actions/tools-deps
- name: prepare names
id: names
shell: bash
run: |
echo "os=-${{ runner.os }}" >> "$GITHUB_OUTPUT"
echo "ext=${{ ((runner.os == 'Windows') && '.exe') || ' ' }}" >> "$GITHUB_OUTPUT"
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: symbolizer
continue-on-error: true
run: cargo build -p=playdate-symbolize --bins
- name: Upload
uses: actions/upload-artifact@v4
with:
name: symbolize-utils${{ steps.names.outputs.suffix }}
path: |
target/debug/pd-addr2line${{ steps.names.outputs.ext }}
target/debug/pd-symbolize-trace${{ steps.names.outputs.ext }}
target/debug/pd-symbolize-crashlog${{ steps.names.outputs.ext }}
compression-level: 9
if-no-files-found: warn
retention-days: 3
overwrite: true
- name: pdtool
continue-on-error: true
run: cargo build -p=playdate-tool --bin=pdtool --features=tracing
- name: Upload
uses: actions/upload-artifact@v4
with:
name: pdtool${{ steps.names.outputs.full }}
path: target/debug/pdtool${{ steps.names.outputs.ext }}
if-no-files-found: warn
retention-days: 3
overwrite: true
- name: bindgen
continue-on-error: true
run: >-
cargo build --bin=pdbindgen --no-default-features
--features=cli,documentation,extra-codegen,logging,pretty-please,which-rustfmt,runtime
- name: Upload
uses: actions/upload-artifact@v4
with:
name: pdbindgen${{ steps.names.outputs.full }}
path: target/debug/pdbindgen${{ steps.names.outputs.ext }}
if-no-files-found: warn
retention-days: 3
overwrite: true
- name: cargo
continue-on-error: true
run: cargo build --bin=cargo-playdate --all-features
- name: Upload
uses: actions/upload-artifact@v4
with:
name: cargo-playdate${{ steps.names.outputs.full }}
path: target/debug/cargo-playdate${{ steps.names.outputs.ext }}
if-no-files-found: warn
retention-days: 3
overwrite: true