Skip to content

Commit

Permalink
.github/workflows/build.yml: add action running on MacOS
Browse files Browse the repository at this point in the history
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
  • Loading branch information
QSXW committed Feb 7, 2024
1 parent 4a404f0 commit f7cefb5
Showing 1 changed file with 41 additions and 6 deletions.
47 changes: 41 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"

- name: Add MSBuild to Path
uses: microsoft/setup-msbuild@v1.1
Expand All @@ -28,9 +30,6 @@ jobs:
- name: Update CMake
run: cmake --version

- name: Fetch Submodule
run: git submodule update --init

- name: Configure CMake
run: ls && cmake -G"Visual Studio 17 2022" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLIBRAW_PATH=${{github.workspace}}/3rdparty/LibRaw

Expand All @@ -57,6 +56,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"

- name: Install Dependencies
run: sudo apt update && sudo apt upgrade -y &&
Expand All @@ -65,9 +66,6 @@ jobs:
- name: Update CMake
run: cmake --version

- name: Fetch Submodule
run: git submodule update --init

- name: Configure CMake
run: ls && ${{ matrix.c }} -v && ${{ matrix.cxx }} -v && cmake -G"Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DLIBRAW_PATH=${{github.workspace}}/3rdparty/LibRaw
Expand All @@ -80,3 +78,40 @@ jobs:
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}

MacOS-Build:
strategy:
matrix:
generator: ["Ninja"]
include:
- generator: Ninja
name: Ninja

runs-on: macos-14

steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.28.1"

- name: Update CMake
run: cmake --version

- name: Configure CMake
run: ls && clang -v && cmake -G ${{ matrix.name }} -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DLIBRAW_PATH=${{github.workspace}}/3rdparty/LibRaw

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target ImmortalEditor --

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}

0 comments on commit f7cefb5

Please sign in to comment.