Assign artifact IDs for generated randarts #169
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
# based on https://angband.readthedocs.io/en/latest/hacking/compiling.html#nintendo-ds-nintendo-3ds | |
name: Nintendo DS | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
_3ds: | |
name: Nintendo 3DS | |
runs-on: ubuntu-latest | |
container: devkitpro/devkitarm | |
steps: | |
- name: Clone Project | |
uses: actions/checkout@v4 | |
- name: Extract Names from Makefile | |
id: get_names | |
run: | | |
progname=`sed -E -n -e 's/^[[:blank:]]*PROGNAME[[:blank:]]+=[[:blank:]]+//p' src/Makefile.src || tr ' #' '\t\t' | tail -1 | cut -f 1` | |
echo "progname=$progname" >> $GITHUB_OUTPUT | |
- name: Build Nintendo 3DS (3dsx) | |
shell: bash | |
run: | | |
pushd src/ | |
make -f Makefile.3ds | |
popd | |
- name: Setup cxitool | |
shell: bash | |
run: | | |
apt-get update && apt-get install -y build-essential automake autoconf autotools-dev | |
git clone -b cxi-stuff https://github.com/devkitPro/3dstools/ | |
pushd 3dstools/ | |
./autogen.sh | |
./configure | |
make install | |
popd | |
- name: Setup makerom | |
shell: bash | |
run: | | |
apt-get update && apt-get install -y build-essential libmbedtls-dev liblzma-dev libyaml-dev | |
git clone https://github.com/3DSGuy/Project_CTR/ | |
pushd Project_CTR/makerom | |
make deps | |
make | |
cp -rv bin/makerom /usr/local/bin | |
popd | |
# The quoting to get progname may be too simple-minded: what if there | |
# are single quotes in the steps.*.outputs.* stuff. Restrict what's | |
# passed to cxitool's --name option to at most 8 characters since that | |
# is a limitation of that tool. | |
- name: Build Nintendo 3DS (cia) | |
shell: bash | |
run: | | |
progname='${{ steps.get_names.outputs.progname }}' | |
procname=`echo "$progname" | head -c 8` | |
pushd src/ | |
cxitool --name "$procname" "$progname".3dsx "$progname".cxi | |
makerom -v -f cia -o $"progname".cia -target t -i "$progname".cxi:0:0 -ignoresign -icon src/nds/icon.smdh | |
popd | |
blocksds: | |
name: Nintendo DS (BlocksDS) | |
runs-on: ubuntu-latest | |
container: skylyrac/blocksds:slim-latest | |
steps: | |
- name: Clone Project | |
uses: actions/checkout@v4 | |
- name: Build | |
shell: bash | |
run: | | |
pushd src/ | |
make -f Makefile.blocksds | |
popd | |
nds: | |
name: Nintendo DS | |
runs-on: ubuntu-latest | |
container: devkitpro/devkitarm | |
steps: | |
- name: Clone Project | |
uses: actions/checkout@v4 | |
- name: Build | |
shell: bash | |
run: | | |
pushd src/ | |
make -f Makefile.nds | |
popd |