diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21f7636..e7f6b4e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,86 +2,57 @@ name: Build on: workflow_dispatch: - # push: - # branches: [ "main" ] - # pull_request: - # branches: [ "main" ] + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' jobs: build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false matrix: - os: [macos-14] - build_type: [RelWithDebInfo] - compiler: [llvm_clang] + os: [macos-latest] include: - # macOS (LLVM Clang - arm64) - - os: macos-14 - compiler: llvm_clang - c_compiler: clang - cpp_compiler: clang++ + - os: macos-latest arch: arm64 - # macOS (LLVM Clang - x86_64) - # - os: macos-14 - # compiler: llvm_clang - # c_compiler: clang - # cpp_compiler: clang++ - # arch: x86_64 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 with: submodules: recursive - # Install LLVM via Homebrew on macOS - # - name: Install LLVM on macOS - # if: matrix.os == 'macos-14' - # run: brew install llvm - - - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v2 - with: - version: "18.1" + # - name: Install LLVM and Clang + # uses: KyleMayes/install-llvm-action@v2 + # with: + # version: "19.1" - name: Install dependencies on macOS - if: matrix.os == 'macos-14' run: | + brew install llvm brew install boost brew install ninja - - name: Set reusable strings - id: strings - shell: bash - run: | - echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - - name: Configure CMake shell: bash run: > - cmake -B ${{ steps.strings.outputs.build-output-dir }} + cmake -B build/release + -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja + -DCMAKE_C_COMPILER="$(brew --prefix llvm)/bin/clang + -DCMAKE_CXX_COMPILER="$(brew --prefix llvm)/bin/clang++ -DSDL_SHARED=OFF -DSDL_STATIC=ON - -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} - -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - -S ${{ github.workspace }} - - - name: Build dawn - run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --target dawn-single-lib + -DBLEND2D_STATIC=ON - name: Build neogurt - run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --target neogurt + run: cmake --build build/release --target neogurt - - name: Generate app - run: make gen-app + - name: Generate package + run: make package - name: Upload build artifacts uses: actions/upload-artifact@v4 with: - name: gen-output - path: gen/ + name: app-dmg + path: build/release/*.dmg