-
Notifications
You must be signed in to change notification settings - Fork 21
71 lines (57 loc) · 1.93 KB
/
main.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build and Install the CGV framework
on: push
jobs:
build-ubuntu:
name: "Ubuntu: Build and Install the CGV framework"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Docker Image
run: docker build . -t build-image
- name: Run Build
run: docker run -v $(pwd):/app build-image
- name: Upload Install zip for Ubuntu
uses: actions/upload-artifact@v2
with:
name: cgv-install-ubuntu
path: ./install
build-windows:
name: "Windows: Build and Install the CGV framework"
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Setup VS Environment
uses: seanmiddleditch/gha-setup-vsdevenv@master
- run: mkdir build
- name: Run CMake
working-directory: build
run: cmake .. -G Ninja -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=../install -D CMAKE_CXX_COMPILER=cl -D CMAKE_C_COMPILER=cl
- name: Build and Install
working-directory: ./build
run: cmake --build . --target install
- name: Upload Install zip for Windows
uses: actions/upload-artifact@v2
with:
name: cgv-install-windows
path: ./install
release:
name: "Create Release"
runs-on: ubuntu-latest
needs: [build-ubuntu, build-windows]
steps:
- uses: actions/download-artifact@v2
- run: zip -r cgv-install-ubuntu.zip cgv-install-ubuntu/
- run: zip -r cgv-install-windows.zip cgv-install-windows/
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
cgv-install-ubuntu.zip
cgv-install-windows.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}