-
Notifications
You must be signed in to change notification settings - Fork 5
139 lines (112 loc) · 4.06 KB
/
release.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Release
on:
release:
types: [created]
jobs:
build-and-release-macos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE --parallel 10
- name: Compress files
run: tar -czf sand-macos-binaries.tar.gz std bin/sand examples internal
- name: Upload the artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: sand-macos-binaries.tar.gz
asset_name: sand-${{ github.event.release.tag_name }}-macos-binaries.tar.gz
asset_content_type: application/tar+gzip
build-and-release-ubuntu:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
cc: [[gcc, g++]]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install C++ packages
run: sudo apt-get install libc++-dev libc++abi-dev
- name: Install uuid package
run: sudo apt-get install uuid-dev
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
env:
CC: ${{ matrix.cc[0] }}
CXX: ${{ matrix.cc[1] }}
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
env:
CC: ${{ matrix.cc[0] }}
CXX: ${{ matrix.cc[1] }}
run: cmake --build . --config $BUILD_TYPE --parallel 10
- name: Compress files
run: tar -czf sand-ubuntu-binaries.tar.gz std bin/sand examples internal
- name: Upload the artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: sand-ubuntu-binaries.tar.gz
asset_name: sand-${{ github.event.release.tag_name }}-ubuntu-binaries.tar.gz
asset_content_type: application/tar+gzip
build-windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: true
path: "."
- uses: ilammy/msvc-dev-cmd@v1
- name: Install 7-zip
run: choco install -y 7zip
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
shell: powershell
working-directory: ${{runner.workspace}}/build
run: cmake $env:GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release
- name: Build
working-directory: ${{runner.workspace}}/build
shell: powershell
run: cmake --build . --config Release
- name: Move bin/Release/sand.exe to bin/sand.exe
run: mv -Force "$env:GITHUB_WORKSPACE/bin/Release/sand.exe" "$env:GITHUB_WORKSPACE/bin/sand.exe"
- name: Compress files
run: 7z a -y sand-windows-binaries.zip std bin/sand.exe examples internal
- name: Upload the artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: sand-windows-binaries.zip
asset_name: sand-${{ github.event.release.tag_name }}-windows-binaries.zip
asset_content_type: application/zip