-
-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (49 loc) · 1.7 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
types: [ "review_requested", "ready_for_review" ]
workflow_dispatch:
name: Build
permissions:
id-token: write
contents: read
env:
BUILD_TYPE: Release
jobs:
build:
name: "Build"
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- os: ubuntu-latest
artifact: "Linux-x64.zip"
conan-install-cmd: conan install conanfile-linux.txt -s compiler.cppstd=20 --build missing --install-folder=${{github.workspace}}/build
- os: windows-latest
artifact: "Windows-x64.zip"
conan-install-cmd: conan install conanfile-windows.txt -s compiler.cppstd=20 --build missing --install-folder=${{github.workspace}}/build
fail-fast: false
steps:
- name: "Checkout"
uses: actions/[email protected]
with:
submodules: recursive
- name: "Get Conan"
uses: turtlebrowser/get-conan@main
- name: "Create Conan Profile"
run: conan profile detect --force
- name: "Install Conan"
run: ${{ matrix.config.conan-install-cmd }}
- name: "CMake Configuration"
run: cmake -B ${{github.workspace}}/build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: "CMake Build"
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: "CMake Install"
run: cmake --install build --prefix ${{github.workspace}}/install --strip
- name: Upload
uses: actions/upload-artifact@v1
with:
path: ${{github.workspace}}/install
name: ${{ matrix.config.artifact }}-${{env.BUILD_TYPE}}