Skip to content

Rename ScriptExplorer tool to just Scripts #200

Rename ScriptExplorer tool to just Scripts

Rename ScriptExplorer tool to just Scripts #200

# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms
on:
push:
branches: [ "main" ]
paths-ignore:
- ".github/assets"
- ".github/wiki"
- "wikigen/**"
- "*.md"
- "apidump.json"
- "imgui.ini"
- "debugger.layout.ini"
pull_request:
branches: [ "main" ]
paths-ignore:
- "wikigen/**"
- "*.md"
- "apidump.json"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
build_type: [Release, Debug, ReleaseTSan, DebugTSan]
c_compiler: [cl, gcc]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: gcc
exclude:
- os: windows-latest
c_compiler: gcc
- os: windows-latest
c_compiler: clang
- os: windows-latest
build_type: ReleaseTSan
- os: windows-latest
build_type: DebugTSan
- os: ubuntu-latest
c_compiler: clang
- os: ubuntu-latest
c_compiler: cl
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Ubuntu dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libwayland-dev libwayland-bin wayland-protocols libxkbcommon-dev
sudo apt-get install xorg-dev
sudo apt-get install libdbus-1-dev
sudo apt-get install libegl1-mesa-dev libgl1-mesa-dev libwayland-egl1
sudo apt-get install libwayland-client0
- name: Configure CMake
env:
CXX: g++
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
# TODO removing causes the wrong build type to be selected?
run: >
cmake -B ./
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ./ -j3 --config ${{ matrix.build_type }}
- name: Configure CMake for Profiler
if: matrix.build_type == 'Release' && runner.os == 'Windows'
run: cmake -B Vendor/tracy/profiler/build -S Vendor/tracy/profiler
- name: Build Profiler
if: matrix.build_type == 'Release' && runner.os == 'Windows'
run: cmake --build Vendor/tracy/profiler/build --config Release -j3 -t tracy-profiler
- name: Create launch shortcut (Windows)
if: runner.os == 'Windows'
shell: cmd
run: echo "\"x64/${{ matrix.build_type }}/PhoenixEngine.exe\"" > run.bat
- name: Create launch shortcut (Linux)
if: runner.os == 'Linux'
run: echo "x64/${{ matrix.build_type }}/PhoenixEngine" > run.sh
- name: Upload build artifact (Windows)
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: "Phoenix_${{ runner.os }}-${{ matrix.build_type }}"
path: |
x64/Debug/PhoenixEngine.exe
x64/Release/PhoenixEngine.exe
resources/
wikigen/
.github/
lsp/
apidump.json
default-layout.ini
debugger-layout.ini
phoenix.conf
Vendor/tracy/profiler/build/Release/tracy-profiler.exe
run.bat
retention-days: 7
- name: Upload build artifact (Ubuntu)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: "Phoenix_${{ runner.os }}-${{ matrix.build_type }}"
path: |
x64/Debug/PhoenixEngine
x64/Release/PhoenixEngine
x64/DebugTSan/PhoenixEngine
x64/ReleaseTSan/PhoenixEngine
resources/
wikigen/
.github/
lsp/
apidump.json
default-layout.ini
debugger-layout.ini
phoenix.conf
Vendor/tracy/profiler/build/tracy-profiler
run.sh
retention-days: 7
- name: Doc Gen (Windows)
if: runner.os == 'Windows' && matrix.build_type != 'Debug'
shell: pwsh
run: ". \"x64\\${{ matrix.build_type }}\\PhoenixEngine.exe\" -headless -tool scripts\\ci\\docs.luau"
- name: Test (Windows)
if: runner.os == 'Windows' && matrix.build_type != 'Debug'
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
. "x64\\${{ matrix.build_type }}\\PhoenixEngine.exe" -headless -tool scripts\\ci\\tests.luau
. "x64\\${{ matrix.build_type }}\\PhoenixEngine.exe" -headless -ed_ci
- name: Doc Gen (Ubuntu)
if: runner.os == 'Linux'
shell: bash
run: "x64/${{ matrix.build_type }}/PhoenixEngine -headless -tool scripts/ci/docs.luau"
- name: Test (Ubuntu)
if: runner.os == 'Linux'
shell: bash
run: |
x64/${{ matrix.build_type }}/PhoenixEngine -headless -tool scripts/ci/tests.luau
x64/${{ matrix.build_type }}/PhoenixEngine -headless -ed_ci