Skip to content

Gamepad shortcut to Surf #1522

Gamepad shortcut to Surf

Gamepad shortcut to Surf #1522

Workflow file for this run

name: Build
on: [push, pull_request]
env:
BUILD_TYPE: MinSizeRel
jobs:
# === Windows XP ===
winxp:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Build
shell: cmd
run: |
COPY /Y build\janet\janetconf.h vendor\janet\src\conf\janetconf.h
cd build
cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_STUB=On ..
cmake --build . --config %BUILD_TYPE% --parallel
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-winxp"
path: build/bin/tic80.exe
- name: Deploy stubs
uses: actions/upload-artifact@v3
with:
name: "tic80-winxp-stub"
path: build/bin/tic80*.exe
# === Windows XP PRO ===
winxp-pro:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Build
shell: cmd
run: |
COPY /Y build\janet\janetconf.h vendor\janet\src\conf\janetconf.h
cd build
cmake -G "Visual Studio 16 2019" -A Win32 -T v141_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_PRO=On ..
cmake --build . --config %BUILD_TYPE% --parallel
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-winxp-pro"
path: build/bin/tic80.exe
# === Windows ===
windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Build
shell: cmd
run: |
cd build
cmake -G "Visual Studio 16 2019" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_STUB=On ..
cmake --build . --config %BUILD_TYPE% --parallel
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-windows"
path: build/bin/tic80.exe
- name: Deploy stubs
uses: actions/upload-artifact@v3
with:
name: "tic80-windows-stub"
path: build/bin/tic80*.exe
# === Windows PRO ===
windows-pro:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Build
shell: cmd
run: |
cd build
cmake -G "Visual Studio 16 2019" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_PRO=On ..
cmake --build . --config %BUILD_TYPE% --parallel
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-windows-pro"
path: build/bin/tic80.exe
# === Windows Sokol ===
windows-sokol:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Build
shell: cmd
run: |
cd build
cmake -G "Visual Studio 16 2019" -DBUILD_SDL=Off -DBUILD_SOKOL=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..
cmake --build . --config %BUILD_TYPE% --parallel
cp bin/tic80-sokol.exe bin/tic80.exe
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-windows-sokol"
path: build/bin/tic80.exe
# === Windows MinGW-64 ===
windows-mingw:
runs-on: windows-2019
steps:
# https://github.com/actions/runner-images/issues/2642#issuecomment-774988591
- name: configure Pagefile
uses: al-cheb/configure-pagefile-action@v1.2
with:
minimum-size: 16GB
maximum-size: 16GB
disk-root: "C:"
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Build
shell: bash
run: |
cd build
cmake -G "MSYS Makefiles" -DCMAKE_C_COMPILER=C:/msys64/mingw64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/msys64/mingw64/bin/c++.exe -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..
cmake --build . --config %BUILD_TYPE% --parallel
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-mingw"
path: build/bin/tic80.exe
# === Ubuntu PRO ===
linux-pro:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Install
run: |
sudo apt-get update
sudo apt-get install libglu1-mesa-dev libasound2-dev libpulse-dev libaudio-dev libsamplerate0-dev libcurl4-openssl-dev -y
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_PRO=On ..
cmake --build . --config $BUILD_TYPE --parallel
cpack
- name: Deploy DEB
uses: actions/upload-artifact@v3
with:
name: "tic80-linux-deb-pro"
path: build/tic80.deb
- name: Deploy ZIP
uses: actions/upload-artifact@v3
with:
name: "tic80-linux-pro"
path: build/bin/tic80
# === Ubuntu ===
linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Install
run: |
sudo apt-get update
sudo apt-get install libglu1-mesa-dev libasound2-dev libpulse-dev libaudio-dev libsamplerate0-dev libcurl4-openssl-dev -y
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_STUB=On ..
cmake --build . --config $BUILD_TYPE --parallel
cpack
- name: Deploy DEB
uses: actions/upload-artifact@v3
with:
name: "tic80-linux-deb"
path: build/tic80.deb
- name: Deploy ZIP
uses: actions/upload-artifact@v3
with:
name: "tic80-linux"
path: build/bin/tic80
- name: Deploy stubs
uses: actions/upload-artifact@v3
with:
name: "tic80-linux-stub"
path: build/bin/tic80*
# === Raspberry PI ===
rpi:
runs-on: ubuntu-latest
container: nesbox/rpi-tic80:latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install Host toolchain
run: |
apt-get update
apt-get install --assume-yes build-essential ruby-full gcc-8-arm-linux-gnueabihf g++-8-arm-linux-gnueabihf
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_STUB=On -DCMAKE_TOOLCHAIN_FILE=rpi/toolchain.cmake ..
cmake --build . --config $BUILD_TYPE --parallel
cpack
- name: Deploy DEB
uses: actions/upload-artifact@v3
with:
name: "tic80-rpi-dep"
path: build/tic80.deb
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-rpi"
path: build/bin/tic80
- name: Deploy stubs
uses: actions/upload-artifact@v3
with:
name: "tic80-rpi-stub"
path: build/bin/tic80*
# === Raspberry PI PRO ===
rpi-pro:
runs-on: ubuntu-latest
container: nesbox/rpi-tic80:latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install Host toolchain
run: |
apt-get update
apt-get install --assume-yes build-essential ruby-full gcc-8-arm-linux-gnueabihf g++-8-arm-linux-gnueabihf
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_PRO=On -DCMAKE_TOOLCHAIN_FILE=rpi/toolchain.cmake ..
cmake --build . --config $BUILD_TYPE --parallel
cpack
- name: Deploy DEB
uses: actions/upload-artifact@v3
with:
name: "tic80-rpi-deb-pro"
path: build/tic80.deb
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-rpi-pro"
path: build/bin/tic80
# === Raspberry PI 1-3 Bare Metal ===
rpi-baremetal:
runs-on: ubuntu-latest
container: nesbox/baremetalpi-tic80:latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install Host toolchain
run: |
apt-get update
apt-get install --assume-yes build-essential ruby-full
- name: Prebuild
run: |
cd vendor
git clone --recursive https://github.com/smuehlst/circle-stdlib
cd circle-stdlib
git checkout fdb3c4a948421d47fddab8042a92f980cba43915
git submodule update --recursive
./configure -r 3
make -j$(nproc)
cd libs/circle/addon/vc4/sound/
make -j$(nproc)
cd ../vchiq
make -j$(nproc)
cd ../../linux
make -j$(nproc)
- name: Build
run: |
git apply build/baremetalpi/circle.patch
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=baremetalpi/toolchain.cmake ..
make tic80studio -j$(nproc)
cd baremetalpi
make -j$(nproc)
cd ../../vendor/circle-stdlib/libs/circle/boot/
make -j$(nproc)
- name: Pack
run: |
cp build/baremetalpi/kernel8-32.img vendor/circle-stdlib/libs/circle/boot/kernel.img
cp build/baremetalpi/boot/config.txt vendor/circle-stdlib/libs/circle/boot/config.txt
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-rpi-baremetal"
path: |
vendor/circle-stdlib/libs/circle/boot/config.txt
vendor/circle-stdlib/libs/circle/boot/kernel.img
vendor/circle-stdlib/libs/circle/boot/bootcode.bin
vendor/circle-stdlib/libs/circle/boot/start.elf
vendor/circle-stdlib/libs/circle/boot/fixup.dat
vendor/circle-stdlib/libs/circle/boot/LICENCE.broadcom
# === Raspberry PI 4 Bare Metal ===
rpi4-baremetal:
runs-on: ubuntu-latest
container: nesbox/baremetalpi-tic80:latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install Host toolchain
run: |
apt-get update
apt-get install --assume-yes build-essential ruby-full
- name: Prebuild
run: |
cd vendor
git clone --recursive https://github.com/smuehlst/circle-stdlib
cd circle-stdlib
git checkout fdb3c4a948421d47fddab8042a92f980cba43915
git submodule update --recursive
./configure -r 4
make -j$(nproc)
cd libs/circle/addon/vc4/sound/
make -j$(nproc)
cd ../vchiq
make -j$(nproc)
cd ../../linux
make -j$(nproc)
- name: Build
run: |
git apply build/baremetalpi/circle.patch
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=baremetalpi/toolchain.cmake ..
make tic80studio -j$(nproc)
cd baremetalpi
make -j$(nproc)
cd ../../vendor/circle-stdlib/libs/circle/boot/
make -j$(nproc)
- name: Pack
run: |
cp build/baremetalpi/kernel7l.img vendor/circle-stdlib/libs/circle/boot/kernel.img
cp build/baremetalpi/boot/config.txt vendor/circle-stdlib/libs/circle/boot/config.txt
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-rpi4-baremetal"
path: |
vendor/circle-stdlib/libs/circle/boot/bcm2711-rpi-4-b.dtb
vendor/circle-stdlib/libs/circle/boot/bcm2711-rpi-cm4.dtb
vendor/circle-stdlib/libs/circle/boot/bootcode.bin
vendor/circle-stdlib/libs/circle/boot/config.txt
vendor/circle-stdlib/libs/circle/boot/COPYING.linux
vendor/circle-stdlib/libs/circle/boot/fixup4.dat
vendor/circle-stdlib/libs/circle/boot/kernel.img
vendor/circle-stdlib/libs/circle/boot/LICENCE.broadcom
vendor/circle-stdlib/libs/circle/boot/start4.elf
# === Nintendo 3DS build ===
nintendo-3ds:
runs-on: ubuntu-latest
container: nesbox/devkitpro-tic80:latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install Host toolchain
run: |
apt-get update
apt-get install --assume-yes build-essential ruby-full
- name: Build
run: |
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$DEVKITPRO/3ds.cmake -DN3DS=TRUE -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
make -j$(nproc)
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-nintendo-3ds"
path: build/bin/tic80.3dsx
# === MacOS 12 ===
macos:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install
run: brew uninstall --ignore-dependencies libidn2
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE DBUILD_SDLGPU=On -DBUILD_STUB=On ..
cmake --build . --config $BUILD_TYPE --parallel
cpack
cp *.dmg tic80.dmg
- name: Deploy DMG
uses: actions/upload-artifact@v3
with:
name: "tic80-macos-dmg"
path: build/tic80.dmg
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-macos"
path: build/bin/tic80
- name: Deploy stubs
uses: actions/upload-artifact@v3
with:
name: "tic80-macos-stub"
path: build/bin/tic80*
# === MacOS 12 PRO ===
macos-pro:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install
run: brew uninstall --ignore-dependencies libidn2
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_PRO=On ..
cmake --build . --config $BUILD_TYPE --parallel
cpack
cp *.dmg tic80.dmg
- name: Deploy DMG
uses: actions/upload-artifact@v3
with:
name: "tic80-macos-dmg-pro"
path: build/tic80.dmg
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-macos-pro"
path: build/bin/tic80
# === Android ===
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r21e
add-to-path: false
local-cache: true
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Build
run: |
cd build/android
chmod +x gradlew
./gradlew assembleRelease
cp app/build/outputs/apk/release/app-release.apk tic80.apk
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-android"
path: build/android/tic80.apk
# === HTML ===
html:
runs-on: ubuntu-latest
steps:
- uses: mymindstorm/setup-emsdk@v11
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Build
run: |
cd build
emcmake cmake -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_STUB=On ..
cmake --build . --config $BUILD_TYPE --parallel
mkdir bin/html bin/html-export
cp html/export.html bin/html-export/index.html
cp bin/tic80*.js bin/html-export/
cp bin/tic80*.wasm bin/html-export/
cp html/index.html bin/html/index.html
cp html/export.html bin/html/export.html
cp bin/tic80.js bin/html/tic80.js
cp bin/tic80.wasm bin/html/tic80.wasm
cp bin/tic80.js webapp/tic80.js
cp bin/tic80.wasm webapp/tic80.wasm
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-html"
path: |
build/bin/html/tic80.js
build/bin/html/tic80.wasm
build/bin/html/index.html
build/bin/html/export.html
- name: Deploy WebApp
uses: actions/upload-artifact@v3
with:
name: "tic80-webapp"
path: |
build/webapp/index.html
build/webapp/serviceworker.js
build/webapp/tic80-180.png
build/webapp/tic80-192.png
build/webapp/tic80-512.png
build/webapp/tic80.webmanifest
build/webapp/tic80.js
build/webapp/tic80.wasm
- name: Deploy stubs
uses: actions/upload-artifact@v3
with:
name: "tic80-html-stub"
path: |
build/bin/html-export/tic80*.js
build/bin/html-export/tic80*.wasm
build/bin/html-export/index.html
# === Export ===
export:
needs: [winxp, windows, linux, rpi, macos, html]
runs-on: ubuntu-latest
steps:
- name: Download Windows XP artifact
uses: actions/download-artifact@v3
with:
name: tic80-winxp
path: winxpdir
- name: Download Windows artifact
uses: actions/download-artifact@v3
with:
name: tic80-windows
path: windir
- name: Download Ubuntu artifact
uses: actions/download-artifact@v3
with:
name: tic80-linux
path: linuxdir
- name: Download RPI artifact
uses: actions/download-artifact@v3
with:
name: tic80-rpi
path: rpidir
- name: Download MacOS artifact
uses: actions/download-artifact@v3
with:
name: tic80-macos
path: macdir
- name: Download HTML artifact
uses: actions/download-artifact@v3
with:
name: tic80-html
- name: Rename
run: |
cp winxpdir/* winxp
cp windir/* win
cp linuxdir/* linux
cp macdir/* mac
cp rpidir/* rpi
mv -f export.html index.html
zip html.zip index.html tic80.js tic80.wasm
mv -f html.zip html
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-export"
path: |
winxp
win
linux
mac
rpi
html
# === Export stub ===
export-stub:
needs: [export]
runs-on: ubuntu-latest
strategy:
matrix:
script: [lua, moon, fennel, ruby, js, wren, squirrel, wasm, scheme, janet, python]
steps:
- name: Download Windows XP artifact
uses: actions/download-artifact@v3
with:
name: tic80-winxp-stub
path: winxpdir
- name: Download Windows artifact
uses: actions/download-artifact@v3
with:
name: tic80-windows-stub
path: windir
- name: Download Ubuntu artifact
uses: actions/download-artifact@v3
with:
name: tic80-linux-stub
path: linuxdir
- name: Download RPI artifact
uses: actions/download-artifact@v3
with:
name: tic80-rpi-stub
path: rpidir
- name: Download MacOS artifact
uses: actions/download-artifact@v3
with:
name: tic80-macos-stub
path: macdir
- name: Download HTML artifact
uses: actions/download-artifact@v3
with:
name: tic80-html-stub
- name: Rename
run: |
cp winxpdir/tic80${{ matrix.script }}.exe winxp${{ matrix.script }}
cp windir/tic80${{ matrix.script }}.exe win${{ matrix.script }}
cp linuxdir/tic80${{ matrix.script }} linux${{ matrix.script }}
cp rpidir/tic80${{ matrix.script }} rpi${{ matrix.script }}
cp macdir/tic80${{ matrix.script }} mac${{ matrix.script }}
mv -f tic80${{ matrix.script }}.js tic80.js
zip html${{ matrix.script }}.zip index.html tic80.js tic80${{ matrix.script }}.wasm
mv -f html${{ matrix.script }}.zip html${{ matrix.script }}
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: "tic80-export"
path: |
winxp${{ matrix.script }}
win${{ matrix.script }}
linux${{ matrix.script }}
rpi${{ matrix.script }}
mac${{ matrix.script }}
html${{ matrix.script }}
# === Delete stub artifacts ===
delete-stub:
needs: [export-stub]
runs-on: ubuntu-latest
steps:
- name: Delete artifacts
uses: geekyeggo/delete-artifact@v2
with:
name: |
tic80-winxp-stub
tic80-windows-stub
tic80-linux-stub
tic80-rpi-stub
tic80-macos-stub
tic80-html-stub
# === Delete PRO artifacts ===
delete-pro:
needs: [winxp-pro, windows-pro, linux-pro, macos-pro, rpi-pro]
runs-on: ubuntu-latest
steps:
- name: Delete artifacts
uses: geekyeggo/delete-artifact@v2
with:
name: |
tic80-macos-pro
tic80-macos-dmg-pro
tic80-winxp-pro
tic80-windows-pro
tic80-linux-deb-pro
tic80-linux-pro
tic80-rpi-deb-pro
tic80-rpi-pro