Repository navigation
Clarify that codepoints also need to be unique #79
Workflow file for this run
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: Main Build | |
| on: | |
| push: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: ${{matrix.os}} - ${{matrix.arch}} | |
| runs-on: ${{matrix.runner}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Linux builds | |
| - os: linux | |
| arch: x86-64 | |
| runner: ubuntu-24.04 | |
| toolchain_file: 'cmake/toolchains/x86-64-gcc.cmake' | |
| extra_packages: 'gcc g++ mesa-utils mesa-common-dev xorg-dev libxrandr-dev' | |
| - os: linux | |
| arch: i686 | |
| runner: ubuntu-24.04 | |
| toolchain_file: 'cmake/toolchains/i686-gcc.cmake' | |
| extra_packages: 'gcc-multilib g++-multilib mesa-utils mesa-common-dev:i386 xorg-dev libxrandr-dev:i386 libxcursor-dev:i386 libxi-dev:i386' | |
| # MS Windows builds | |
| - os: mswin | |
| arch: x86-64 | |
| runner: ubuntu-24.04 | |
| toolchain_file: 'cmake/toolchains/x86-64-w64-mingw32.cmake' | |
| extra_packages: 'gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64' | |
| - os: mswin | |
| arch: i686 | |
| runner: ubuntu-24.04 | |
| toolchain_file: 'cmake/toolchains/i686-w64-mingw32.cmake' | |
| extra_packages: 'gcc-mingw-w64-i686 g++-mingw-w64-i686' | |
| # macOS builds (native compilation) | |
| - os: macos | |
| arch: arm64 | |
| runner: macos-14 | |
| # MS DOS builds | |
| - os: msdos | |
| arch: i586 | |
| runner: ubuntu-24.04 | |
| toolchain_file: 'cmake/toolchains/i586-msdosdjgpp.cmake' | |
| extra_packages: 'libfl-dev' | |
| - os: wasm | |
| arch: x86 | |
| runner: ubuntu-24.04 | |
| toolchain_file: '${HOME}/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake' | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install build dependencies (Linux) | |
| if: matrix.os == 'linux' || matrix.os == 'mswin' | |
| run: | | |
| sudo dpkg --add-architecture i386 | |
| sudo apt-get update | |
| sudo apt-get install -y cmake ${{ matrix.extra_packages }} | |
| - name: Install build dependencies (macOS) | |
| if: matrix.os == 'macos' | |
| run: | | |
| set -e | |
| brew uninstall cmake || true | |
| wget -q https://github.com/Kitware/CMake/releases/download/v3.31.12/cmake-3.31.12-macos-universal.tar.gz | |
| echo "799af7fd545db9bf1b9cfe72f8095880e727a2d4e0df0e3dffc3bc7b95c2d3b0 *cmake-3.31.12-macos-universal.tar.gz" > sha256sums.txt | |
| shasum --algorithm 256 --check sha256sums.txt | |
| tar -xzf cmake-3.31.12-macos-universal.tar.gz | |
| sudo cp -r cmake-3.31.12-macos-universal/CMake.app /Applications/ | |
| echo "/Applications/CMake.app/Contents/bin" >> $GITHUB_PATH | |
| brew install ninja | |
| - name: Install build dependencies (MS DOS) | |
| if: matrix.os == 'msdos' | |
| run: | | |
| set -e | |
| sudo apt-get update | |
| sudo apt-get install -y cmake ${{ matrix.extra_packages }} | |
| wget -q https://github.com/andrewwutw/build-djgpp/releases/download/v3.4/djgpp-linux64-gcc1220.tar.bz2 | |
| echo "8464f17017d6ab1b2bb2df4ed82357b5bf692e6e2b7fee37e315638f3d505f00 *djgpp-linux64-gcc1220.tar.bz2" | sha256sum --check --status - | |
| tar -xjf djgpp-linux64-gcc1220.tar.bz2 -C "${{ runner.temp }}" | |
| echo "${{ runner.temp }}/djgpp/bin" >> $GITHUB_PATH | |
| - name: Install build dependencies (WASM) | |
| if: matrix.os == 'wasm' | |
| run: | | |
| pushd "${HOME}" > /dev/null || exit 1 | |
| git clone https://github.com/emscripten-core/emsdk.git | |
| cd emsdk | |
| ./emsdk install 6.0.4 | |
| ./emsdk activate 6.0.4 | |
| popd > /dev/null || exit 1 | |
| - name: Generate build files | |
| run: > | |
| cmake | |
| -B build | |
| -S . | |
| -G Ninja | |
| -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
| ${{ matrix.toolchain_file && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.toolchain_file) || '' }} | |
| - name: Build | |
| run: cmake --build build -j $(sysctl -n hw.logicalcpu || nproc) | |
| - name: List build output | |
| run: ls -la build/ | |
| - name: Run tests | |
| if: matrix.os == 'linux' || matrix.os == 'macos' | |
| run: ctest --test-dir build --output-on-failure | |
| - name: Prepare distribution package | |
| run: cmake --install build --prefix dist | |
| - name: Extract version | |
| id: version | |
| run: | | |
| VERSION=$(grep 'REPO_SHORT_VERSION' build/CMakeCache.txt | cut -d "=" -f2) | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| - name: Upload Build Artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: hacked-${{ steps.version.outputs.version }}-${{ matrix.os }}-${{ matrix.arch }} | |
| path: dist/ | |
| if-no-files-found: warn | |
| retention-days: 7 |