Skip to content

Commit

Permalink
edit workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
williamhCode committed Oct 29, 2024
1 parent 05a02ac commit 3d99dc1
Showing 1 changed file with 21 additions and 51 deletions.
72 changes: 21 additions & 51 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,86 +2,56 @@ 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

0 comments on commit 3d99dc1

Please sign in to comment.