Files
TIC-80/.github/workflows/build.yml
2026-05-03 14:08:13 +03:00

199 lines
5.5 KiB
YAML

name: Build
on: [push, pull_request]
# as recommended by: https://github.com/actions/checkout/issues/1590
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
jobs:
# === Windows ===
windows:
runs-on: windows-2022
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 17 2022" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_WITH_ALL=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
cmake --build . --config MinSizeRel --parallel
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: "tic80-windows"
path: |
build/bin/tic80.exe
build/bin/*.dll
- name: Build Pro
shell: cmd
run: |
cd build
cmake -G "Visual Studio 17 2022" -DBUILD_SDLGPU=On -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --parallel
- name: Deploy Pro
uses: actions/upload-artifact@v4
with:
name: "tic80-windows-pro"
path: |
build/bin/tic80.exe
build/bin/*.dll
# === Ubuntu ===
linux-gcc12-glibc235:
runs-on: ubuntu-22.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 gcc-12 g++-12 libglu1-mesa-dev libasound2-dev libpulse-dev libaudio-dev libsamplerate0-dev libcurl4-openssl-dev -y
sudo ln -s -f /usr/bin/gcc-12 /usr/bin/gcc
sudo ln -s -f /usr/bin/g++-12 /usr/bin/g++
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SDLGPU=On -DBUILD_STATIC=ON -DBUILD_WITH_ALL=ON ..
cmake --build . --parallel
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: "tic80-linux-gcc12"
path: |
build/bin/tic80
build/bin/*.so
- name: Build Pro
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SDLGPU=On -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --parallel
# === Ubuntu gcc14 ===
linux-gcc14-glibc239:
runs-on: ubuntu-24.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 add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo apt update
sudo apt-get install gcc-14 g++-14 libxext-dev libglu1-mesa-dev libasound2-dev libpulse-dev libaudio-dev libsamplerate0-dev libcurl4-openssl-dev -y
sudo ln -s -f /usr/bin/gcc-14 /usr/bin/gcc
sudo ln -s -f /usr/bin/g++-14 /usr/bin/g++
- name: Build
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SDLGPU=On -DBUILD_STATIC=ON -DBUILD_WITH_ALL=ON ..
cmake --build . --parallel
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: "tic80-linux-gcc14"
path: |
build/bin/tic80
build/bin/*.so
- name: Build Pro
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SDLGPU=On -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --config MinSizeRel --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=Release -DBUILD_STATIC=ON -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
cmake --build . --parallel
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: "tic80-macos-arm64"
path: |
build/bin/tic80
build/bin/*.dylib
- name: Build Pro
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SDLGPU=On -DBUILD_PRO=On -DBUILD_WITH_ALL=ON ..
cmake --build . --parallel
# === MacOS 15 / x86_64 ===
macos:
runs-on: macos-15-intel
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=Release -DBUILD_STATIC=ON -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
cmake --build . --parallel
- name: Deploy
uses: actions/upload-artifact@v4
with:
name: "tic80-macos"
path: |
build/bin/tic80
build/bin/*.dylib
- name: Build Pro
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SDLGPU=On -DBUILD_PRO=On -DBUILD_WITH_ALL=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
cmake --build . --parallel