build fix #1771
Workflow file for this run
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
name: Build | |
on: [push, pull_request] | |
env: | |
BUILD_TYPE: MinSizeRel | |
jobs: | |
# === Windows XP === | |
winxp: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
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_WITH_ALL=ON .. | |
cmake --build . --config %BUILD_TYPE% --parallel | |
- name: Deploy | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "tic80-winxp" | |
path: | | |
build/bin/tic80.exe | |
build/bin/*.dll | |
- name: Build Pro | |
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 -DBUILD_WITH_ALL=ON .. | |
cmake --build . --config %BUILD_TYPE% --parallel | |
# === Windows === | |
windows: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
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_WITH_ALL=ON .. | |
cmake --build . --config %BUILD_TYPE% --parallel | |
- name: Deploy | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "tic80-windows" | |
path: | | |
build/bin/tic80.exe | |
build/bin/*.dll | |
- name: Build Sokol | |
shell: cmd | |
run: | | |
cd build | |
cmake -G "Visual Studio 16 2019" -DBUILD_SDL=Off -DBUILD_SOKOL=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_WITH_ALL=ON .. | |
cmake --build . --config %BUILD_TYPE% --parallel | |
cp bin/tic80-sokol.exe bin/tic80.exe | |
- name: Deploy Sokol | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "tic80-windows-sokol" | |
path: build/bin/tic80.exe | |
- name: Build Pro | |
shell: cmd | |
run: | | |
cd build | |
cmake -G "Visual Studio 16 2019" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DBUILD_PRO=On -DBUILD_WITH_ALL=ON .. | |
cmake --build . --config %BUILD_TYPE% --parallel | |
# === 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@v4 | |
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% -DBUILD_WITH_ALL=ON .. | |
cmake --build . --config %BUILD_TYPE% --parallel | |
# === Ubuntu === | |
linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
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_WITH_ALL=ON .. | |
cmake --build . --config $BUILD_TYPE --parallel | |
cpack | |
- name: Deploy DEB | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "tic80-linux-deb" | |
path: build/tic80.deb | |
- name: Deploy ZIP | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "tic80-linux" | |
path: | | |
build/bin/tic80 | |
build/bin/*.so | |
- name: Build Pro | |
run: | | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_PRO=On -DBUILD_WITH_ALL=ON .. | |
cmake --build . --config $BUILD_TYPE --parallel | |
cpack | |
# === 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 -DCMAKE_TOOLCHAIN_FILE=rpi/toolchain.cmake -DBUILD_WITH_ALL=ON .. | |
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: Build Pro | |
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 | |
# === Raspberry PI 1-4 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 -DBUILD_WITH_ALL=ON .. | |
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 -DBUILD_WITH_ALL=ON .. | |
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 -DBUILD_WITH_ALL=ON .. | |
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@v4 | |
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_WITH_ALL=ON .. | |
cmake --build . --config $BUILD_TYPE --parallel | |
cpack | |
cp *.dmg tic80.dmg | |
- name: Deploy DMG | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "tic80-macos-dmg" | |
path: build/tic80.dmg | |
- name: Deploy | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "tic80-macos" | |
path: | | |
build/bin/tic80 | |
build/bin/*.dylib | |
- name: Build | |
run: | | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_PRO=On -DBUILD_WITH_ALL=ON .. | |
cmake --build . --config $BUILD_TYPE --parallel | |
# === MacOS 14 / arm64 === | |
macos-arm64: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
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_WITH_ALL=ON .. | |
cmake --build . --config $BUILD_TYPE --parallel | |
cpack | |
cp *.dmg tic80.dmg | |
- name: Deploy DMG | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "tic80-macos-arm64-dmg" | |
path: build/tic80.dmg | |
- name: Deploy | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "tic80-macos-arm64" | |
path: | | |
build/bin/tic80 | |
build/bin/*.dylib | |
- name: Build | |
run: | | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SDLGPU=On -DBUILD_PRO=On -DBUILD_WITH_ALL=ON .. | |
cmake --build . --config $BUILD_TYPE --parallel | |
# === Android === | |
android: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
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@v4 | |
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@v4 | |
with: | |
name: "tic80-android" | |
path: build/android/tic80.apk | |
# === HTML === | |
html: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: mymindstorm/setup-emsdk@v14 | |
- uses: actions/checkout@v4 | |
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_WITH_ALL=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@v4 | |
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@v4 | |
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 |