forked from bmwcarit/ramses
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (76 loc) · 2.91 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
name: Release
on:
push:
tags:
- '*.*.*'
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Build and package (Linux)
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
sudo apt-get update && sudo apt-get -y --no-install-recommends install \
libgles2-mesa-dev \
libx11-dev
cmake $GITHUB_WORKSPACE \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-Dramses-sdk_CPACK_GENERATOR=DEB \
-Dramses-sdk_BUILD_TESTS=OFF \
-Dramses-sdk_BUILD_EXAMPLES=OFF \
-Dramses-sdk_BUILD_SMOKE_TESTS=OFF \
-Dramses-sdk_BUILD_DEMOS=OFF \
-Dramses-sdk_BUILD_DOCS=OFF \
-Dramses-sdk_ENABLE_WAYLAND_IVI=OFF
cmake --build . --target package --config $BUILD_TYPE
find . -name '*deb' -exec bash -c 'mv $0 ramses-linux-x64.deb' {} \;
if: ${{ matrix.os == 'ubuntu-20.04' }}
- name: Build and package (Windows)
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
# This is needed because on the Windows Server 2019 build nodes of Github, the Perl installation
# exposes its libraries on the path and messes up CMake builds
restore_path=$PATH
echo "Path before: $PATH"
export PATH=$(echo "$PATH" | sed -e 's/:\/c\/Strawberry\/c\/bin//')
export PATH=$(echo "$PATH" | sed -e 's/:\/c\/Strawberry\/perl\/site\/bin//')
export PATH=$(echo "$PATH" | sed -e 's/:\/c\/Strawberry\/perl\/bin//')
echo "Path after: $PATH"
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_CONFIGURATION_TYPES=$BUILD_TYPE \
-Dramses-sdk_CPACK_GENERATOR=ZIP \
-Dramses-sdk_BUILD_TESTS=OFF \
-Dramses-sdk_BUILD_EXAMPLES=OFF \
-Dramses-sdk_BUILD_SMOKE_TESTS=OFF \
-Dramses-sdk_BUILD_DEMOS=OFF \
-Dramses-sdk_BUILD_DOCS=OFF \
-Dramses-sdk_ENABLE_WAYLAND_IVI=OFF
cmake --build . --target package --config $BUILD_TYPE
find . -name '*zip' -exec bash -c 'mv $0 ramses-windows-x64.zip' {} \;
if: ${{ matrix.os == 'windows-2019' }}
- name: Publish release
uses: softprops/[email protected]
with:
fail_on_unmatched_files: true
files: |
${{runner.workspace}}/build/ramses-windows-x64.zip
if: ${{ matrix.os == 'windows-2019' }}
- name: Publish release
uses: softprops/[email protected]
with:
fail_on_unmatched_files: true
files: |
${{runner.workspace}}/build/ramses-linux-x64.deb
if: ${{ matrix.os == 'ubuntu-20.04' }}