forked from samdze/playdate-nim
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
56 changed files
with
4,839 additions
and
527 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,54 @@ | ||
name: Common build setup | ||
inputs: | ||
nim-version: | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- name: Git safe directory | ||
shell: bash | ||
run: git config --global --add safe.directory "$(pwd)" | ||
|
||
- name: Install Nim | ||
shell: bash | ||
run: choosenim -y update ${{ inputs.nim-version }} | ||
|
||
- run: nimble --accept refresh | ||
shell: bash | ||
|
||
- run: nimble install --verbose | ||
shell: bash | ||
|
||
- run: echo "/github/home/.nimble/bin" >> $GITHUB_PATH | ||
shell: bash | ||
|
||
- run: which pdn | ||
shell: bash | ||
|
||
- name: Locally publish playdate nimble package | ||
shell: bash | ||
if: ${{ startsWith(inputs.nim-version, '1.') }} | ||
run: nimble develop | ||
|
||
# Some of the apt dependencies require input from the installer. This disables those | ||
# prompts so we can do a headless install | ||
- name: Force non-interactive apt installations | ||
shell: bash | ||
run: echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections | ||
|
||
- name: Update Apt dependencies | ||
shell: bash | ||
run: apt-get update | ||
|
||
- name: Install apt dependencies | ||
shell: bash | ||
run: apt-get install -y libpng16-16 gcc-arm-none-eabi wget | ||
|
||
- name: Download playdate SDK | ||
shell: bash | ||
run: wget -qO- https://download.panic.com/playdate_sdk/linux/playdatesdk-latest.tar.gz | tar xvz | ||
|
||
- name: Set PLAYDATE_SDK_PATH | ||
shell: bash | ||
run: echo "PLAYDATE_SDK_PATH=$(readlink -f $(find PlaydateSDK-* -maxdepth 0 -type d))" >> "$GITHUB_ENV" |
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,39 @@ | ||
name: macos build setup | ||
inputs: | ||
nim-version: | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- name: Git safe directory | ||
shell: bash | ||
run: git config --global --add safe.directory "$(pwd)" | ||
|
||
- uses: iffy/install-nim@v5 | ||
with: | ||
version: ${{ inputs.nim-version }} | ||
- run: nimble --accept refresh | ||
shell: bash | ||
|
||
- run: nimble install | ||
shell: bash | ||
|
||
- name: Locally publish playdate nimble package | ||
shell: bash | ||
if: ${{ startsWith(inputs.nim-version, '1.') }} | ||
run: nimble develop | ||
|
||
- name: Install Playdate SDK | ||
id: playdate | ||
uses: pd-rs/[email protected] | ||
with: | ||
version: latest # possible values: version `x.x.x` or `latest` by default | ||
|
||
- name: print playdate sdk info | ||
shell: bash | ||
run: | | ||
echo "SDK path env: $PLAYDATE_SDK_PATH" | ||
echo "SDK root out: ${{ steps.playdate.outputs.root }}" | ||
echo "SDK version: ${{ steps.playdate.outputs.version }}" | ||
pdc --version # because SDK/bin already in PATH |
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,12 @@ | ||
name: Common setup steps for a playdate nimble project | ||
inputs: | ||
working-directory: | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
working-directory: ${{ inputs.working-directory }} | ||
run: nimble install --depsOnly --accept |
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
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
Oops, something went wrong.