mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
Add MacOS building to the Github Actions (#643)
* Add MacOS to CMakePresets.json * Update workflow to run MacOS builds * Update test and build presets * Add libssl install to integration * Update workflow to install libssl and openssl * Prevent brew running as super user
This commit is contained in:
parent
3d46d703b2
commit
9c0819de4f
7
.github/workflows/build-and-test.yml
vendored
7
.github/workflows/build-and-test.yml
vendored
@ -12,18 +12,21 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ windows-2022, ubuntu-20.04 ]
|
os: [ windows-2022, ubuntu-20.04, macos-11 ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Add msbuild to PATH (windows only)
|
- name: Add msbuild to PATH (Windows only)
|
||||||
if: ${{ matrix.os == 'windows-2022' }}
|
if: ${{ matrix.os == 'windows-2022' }}
|
||||||
uses: microsoft/setup-msbuild@v1.1
|
uses: microsoft/setup-msbuild@v1.1
|
||||||
with:
|
with:
|
||||||
vs-version: '[17,18)'
|
vs-version: '[17,18)'
|
||||||
msbuild-architecture: x64
|
msbuild-architecture: x64
|
||||||
|
- name: Install libssl (Mac Only)
|
||||||
|
if: ${{ matrix.os == 'macos-11' }}
|
||||||
|
run: brew install openssl@3
|
||||||
- name: cmake
|
- name: cmake
|
||||||
uses: lukka/run-cmake@v10
|
uses: lukka/run-cmake@v10
|
||||||
with:
|
with:
|
||||||
|
@ -19,6 +19,15 @@
|
|||||||
"description": "Same as default, Used in GitHub actions workflow",
|
"description": "Same as default, Used in GitHub actions workflow",
|
||||||
"inherits": "default"
|
"inherits": "default"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-macos-11",
|
||||||
|
"displayName": "CI configure step for MacOS",
|
||||||
|
"description": "Same as default, Used in GitHub actions workflow",
|
||||||
|
"inherits": "default",
|
||||||
|
"cacheVariables": {
|
||||||
|
"OPENSSL_ROOT_DIR": "/usr/local/Cellar/openssl@3/3.0.5/"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ci-windows-2022",
|
"name": "ci-windows-2022",
|
||||||
"displayName": "CI configure step for Windows",
|
"displayName": "CI configure step for Windows",
|
||||||
@ -66,6 +75,13 @@
|
|||||||
"displayName": "Linux CI Build",
|
"displayName": "Linux CI Build",
|
||||||
"description": "This preset is used by the CI build on linux",
|
"description": "This preset is used by the CI build on linux",
|
||||||
"jobs": 2
|
"jobs": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-macos-11",
|
||||||
|
"configurePreset": "ci-macos-11",
|
||||||
|
"displayName": "MacOS CI Build",
|
||||||
|
"description": "This preset is used by the CI build on MacOS",
|
||||||
|
"jobs": 2
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"testPresets": [
|
"testPresets": [
|
||||||
@ -81,6 +97,18 @@
|
|||||||
"outputOnFailure": true
|
"outputOnFailure": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-macos-11",
|
||||||
|
"configurePreset": "ci-macos-11",
|
||||||
|
"displayName": "CI Tests on MacOS",
|
||||||
|
"description": "Runs all tests on a Mac configuration",
|
||||||
|
"execution": {
|
||||||
|
"jobs": 2
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
|
"outputOnFailure": true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ci-windows-2022",
|
"name": "ci-windows-2022",
|
||||||
"configurePreset": "ci-windows-2022",
|
"configurePreset": "ci-windows-2022",
|
||||||
|
Loading…
Reference in New Issue
Block a user