name: Release on: push: branches: - master jobs: release: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} defaults: run: shell: ${{ matrix.shell || 'sh' }} strategy: fail-fast: false matrix: include: - { name: 'Linux', os: 'ubuntu-latest', dx5: false, config: true, build-type: 'Release', linux: true, werror: true, clang-tidy: true } - { name: 'Windows', os: 'windows-latest', dx5: false, config: false, build-type: 'Release', msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64' } - { name: 'macOS', os: 'macos-latest', dx5: false, config: true, build-type: 'Release', brew: true, werror: true, clang-tidy: false } - { name: 'Emscripten', os: 'ubuntu-latest', dx5: false, config: false, build-type: 'Release', emsdk: true, werror: true, clang-tidy: false, cmake-wrapper: 'emcmake' } steps: - name: Setup vcvars if: ${{ !!matrix.msvc }} uses: ilammy/msvc-dev-cmd@v1 with: arch: ${{ matrix.vc-arch }} - name: Set up MSYS2 if: ${{ !!matrix.msystem }} uses: msys2/setup-msys2@v2 with: msystem: ${{ matrix.msystem }} install: >- ${{ matrix.msys-env }}-cc ${{ matrix.msys-env }}-cmake ${{ matrix.msys-env }}-ninja ${{ matrix.msys-env }}-clang-tools-extra ${{ (matrix.config && format('{0}-qt6-base', matrix.msys-env)) || '' }} - name: Install Linux dependencies (apt-get) if: ${{ matrix.linux }} run: | sudo apt-get update sudo apt-get install -y \ libx11-dev libxext-dev libxrandr-dev libxrender-dev libxfixes-dev libxi-dev libxinerama-dev \ libxcursor-dev libwayland-dev libxkbcommon-dev wayland-protocols libgl1-mesa-dev libglew-dev qt6-base-dev - name: Install macOS dependencies (brew) if: ${{ matrix.brew }} run: | brew update brew install cmake ninja llvm qt6 echo "LLVM_ROOT=$(brew --prefix llvm)/bin" >> $GITHUB_ENV - name: Setup Emscripten uses: mymindstorm/setup-emsdk@master if: ${{ matrix.emsdk }} - name: Setup ninja if: ${{ matrix.msvc }} uses: ashutoshvarma/setup-ninja@master - uses: actions/checkout@v4 - name: Configure (CMake) run: | ${{ matrix.cmake-wrapper || '' }} cmake -S . -B build -GNinja \ -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ -DISLE_USE_DX5=${{ !!matrix.dx5 }} \ -DISLE_BUILD_CONFIG=${{ matrix.config }} \ -DENABLE_CLANG_TIDY=${{ !!matrix.clang-tidy }} \ -DISLE_WERROR=${{ !!matrix.werror }} \ -Werror=dev - name: Build (CMake) run: cmake --build build --verbose - name: Package (CPack) run: | cd build cpack . - name: Checkout uploadtool if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'isledecomp/isle-portable' }} uses: actions/checkout@v4 with: repository: 'probonopd/uploadtool' path: 'uploadtool' - name: Upload Continuous Release if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'isledecomp/isle-portable' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }} run: | export UPLOADTOOL_SUFFIX="${{ matrix.name }}" ./uploadtool/upload.sh build/dist/isle-*