-
Notifications
You must be signed in to change notification settings - Fork 1
103 lines (89 loc) · 2.7 KB
/
binary.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Binary
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CMAKE_BUILD_PARALLEL_LEVEL: 8
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
compiler: g++
- os: macos-latest
compiler: clang++
- os: windows-latest
compiler: cl
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install libomp (macOS)
if: matrix.os == 'macos-latest'
run: brew install libomp
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
env:
CXX: ${{ matrix.compiler }}
run: cmake $GITHUB_WORKSPACE -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_STANDARD=11
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
retention-days: 1
path: |
${{github.workspace}}/build/**/Scaffolder
${{github.workspace}}/build/**/Scaffolder.SliceTest
${{github.workspace}}/build/**/Scaffolder.exe
${{github.workspace}}/build/**/Scaffolder.SliceTest.exe
${{github.workspace}}/build/**/*.dll
${{github.workspace}}/build/**/*.pdb
${{github.workspace}}/build/**/*.so
${{github.workspace}}/build/**/*.pyd
${{github.workspace}}/build/**/*.exp
${{github.workspace}}/build/**/*.lib
!${{github.workspace}}/build/**/lua*
!${{github.workspace}}/build/**/tbb*
release:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/download-artifact@v3
with:
name: ubuntu-latest
path: ubuntu
- uses: actions/download-artifact@v3
with:
name: macos-latest
path: macos
- uses: actions/download-artifact@v3
with:
name: windows-latest
path: windows
- name: List files
run: ls -R
- uses: actions/upload-artifact@v3
with:
name: bin64
path: ${{github.workspace}}/**
- name: Upload Release
uses: ncipollo/release-action@v1
if: github.event_name == 'release'
with:
artifacts: bin64
token: ${{ secrets.GITHUB_TOKEN }}