Allow 3ds target alias #31
This file contains hidden or 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
| name: NetSurf 3DS Build (Optimized TLS) | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: {} | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: devkitpro/devkitarm:latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install 3DS dependencies | |
| shell: bash | |
| run: | | |
| dkp-pacman -S --needed --noconfirm \ | |
| 3ds-sdl \ | |
| 3ds-mbedtls \ | |
| 3ds-curl \ | |
| 3ds-libpng \ | |
| 3ds-libjpeg-turbo \ | |
| 3ds-libiconv \ | |
| 3ds-freetype \ | |
| 3ds-zlib | |
| - name: Install parser generators | |
| shell: bash | |
| run: | | |
| if command -v apt-get >/dev/null 2>&1; then | |
| apt-get update | |
| apt-get install -y flex bison | |
| else | |
| pacman -Sy --noconfirm flex bison | |
| fi | |
| - name: Build New 3DS fullheap-safe | |
| shell: bash | |
| run: | | |
| # devkitARM toolchain in PATH bringen | |
| . /etc/profile.d/devkit-env.sh | |
| export PATH="$PATH:/opt/devkitpro/devkitARM/bin" | |
| which arm-none-eabi-gcc || { echo "arm-none-eabi-gcc not in PATH"; exit 1; } | |
| export CC=arm-none-eabi-gcc | |
| export HOST=arm-none-eabi | |
| export CFLAGS='-O2 -DNETSURF_USE_SAFE_FULLHEAP' | |
| make TARGET=3ds HOST=arm-none-eabi CC=arm-none-eabi-gcc -j"$(nproc)" | |
| make TARGET=3ds HOST=arm-none-eabi CC=arm-none-eabi-gcc bundle -j"$(nproc)" | |
| - name: Inject CA bundle and mime.types | |
| shell: bash | |
| run: | | |
| mkdir -p stage | |
| unzip -q bundle/resources.zip -d stage | |
| mkdir -p stage/share/netsurf | |
| curl -fsSL https://curl.se/ca/cacert.pem -o stage/share/netsurf/ca-bundle.crt | |
| curl -fsSL https://raw.githubusercontent.com/nginx/nginx/master/conf/mime.types -o stage/share/netsurf/mime.types | |
| (cd stage && zip -qr ../resources.patched.zip share) | |
| mv resources.patched.zip bundle/resources.zip | |
| - name: Upload 3DSX artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: netsurf-3dsx | |
| path: bundle/netsurf-3dsx.zip | |
| if-no-files-found: error | |
| - name: Upload TLS-ready resources | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: resources | |
| path: bundle/resources.zip | |
| if-no-files-found: error |