Skip to content

Commit

Permalink
Update CI jobs to build on Windows and MacOS too
Browse files Browse the repository at this point in the history
  • Loading branch information
oclero committed Jan 11, 2024
1 parent 2922421 commit a7c35de
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ name: Linux

on:
push:
branches: ['master']
branches:
- master
- dev
pull_request:
branches: ['master']
branches:
- master
- dev

env:
# CMake build type (Release, Debug, RelWithDebInfo, etc.).
BUILD_TYPE: Release
GENERATOR: Unix Makefiles
QT_VERSION: '5.15.2'

jobs:
build:
Expand All @@ -23,13 +29,13 @@ jobs:
# Installs the Qt SDK.
uses: jurplel/install-qt-action@v3
with:
version: '5.15.2'
host: 'linux'
target: 'desktop'
version: ${{env.QT_VERSION}}
host: linux
target: desktop

- name: Configure CMake
# Configures CMake in a 'build' subdirectory.
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake -B ${{github.workspace}}/build -G "${{env.GENERATOR}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Builds the library.
# Builds with the given configuration.
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: MacOS

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

env:
# CMake build type (Release, Debug, RelWithDebInfo, etc.).
BUILD_TYPE: Release
GENERATOR: Xcode
QT_VERSION: '5.15.2'

jobs:
build:
runs-on: macos-latest

steps:
- name: Check Out
# Checks out the repository.
uses: actions/checkout@v4

- name: Install Qt
# Installs the Qt SDK.
uses: jurplel/install-qt-action@v3
with:
version: ${{env.QT_VERSION}}
host: mac
target: desktop

- name: Configure CMake
# Configures CMake in a 'build' subdirectory.
run: cmake -B ${{github.workspace}}/build -G "${{env.GENERATOR}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY=""

- name: Builds the library.
# Builds with the given configuration.
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Builds the Sandbox app.
# Builds the sandbox app with the given configuration.
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target sandbox
46 changes: 46 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Windows

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

env:
# CMake build type (Release, Debug, RelWithDebInfo, etc.).
BUILD_TYPE: Release
GENERATOR: Visual Studio 17 2022
QT_VERSION: '5.15.2'

jobs:
build:
runs-on: windows-latest

steps:
- name: Check Out
# Checks out the repository.
uses: actions/checkout@v4

- name: Install Qt
# Installs the Qt SDK.
uses: jurplel/install-qt-action@v3
with:
version: ${{env.QT_VERSION}}
host: windows
target: desktop

- name: Configure CMake
# Configures CMake in a 'build' subdirectory.
run: cmake -B ${{github.workspace}}/build -G "${{env.GENERATOR}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Builds the library.
# Builds with the given configuration.
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Builds the Sandbox app.
# Builds the sandbox app with the given configuration.
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target sandbox

0 comments on commit a7c35de

Please sign in to comment.