-
Notifications
You must be signed in to change notification settings - Fork 2
131 lines (112 loc) · 5.15 KB
/
builds.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
name: Builds
on:
push:
branches:
- main
- pass_rework
jobs:
build:
name: "${{matrix.title}} (${{matrix.cc}}, ${{matrix.arch}}, ${{matrix.build_type}})"
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
include:
# We can build Windows/Mac
- { title: "Linux", os: "ubuntu-latest", cc: "clang-14", cx: "clang++-14", arch: "x64", build_type: "Release" }
- { title: "Linux", os: "ubuntu-latest", cc: "clang-14", cx: "clang++-14", arch: "x64", build_type: "Debug" }
# - { title: "Linux", os: "ubuntu-latest", cc: "gcc-11", cx: "g++-11", arch: "x64", build_type: "Release" }
# - { title: "Linux", os: "ubuntu-latest", cc: "gcc-11", cx: "g++-11", arch: "x64", build_type: "Debug" }
- { title: "Windows", os: "windows-latest", cc: "vs2022", arch: "x64", build_type: "Release", package_type: "x64-windows-static-md", script: "bat" }
- { title: "Windows", os: "windows-latest", cc: "vs2022", arch: "x64", build_type: "Debug", package_type: "x64-windows-static-md", script: "bat" }
- { title: "Mac", os: "macos-latest", cc: "clang-15", cx: "clang++-15", arch: "x64", build_type: "Release" }
- { title: "Mac", os: "macos-latest", cc: "clang-15", cx: "clang++-15", arch: "x64", build_type: "Debug" }
steps:
- uses: actions/checkout@v2
- name: Install Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.261.1
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
# TODO: Do we really need all this junk on linux?
- name: Install Libraries
run: |
wget https://apt.llvm.org/llvm.sh
sudo bash ./llvm.sh 14
sudo apt update
sudo apt-get install build-essential clang-14 gcc-11 g++-11 xserver-xorg-dev x11proto-xf86vidmode-dev libxxf86vm-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libxext-dev
if: matrix.os == 'ubuntu-latest'
- name: Prebuild
working-directory: ${{github.workspace}}
shell: bash
run: |
git submodule update --init --recursive
./prebuild.bat
if: matrix.os == 'windows-latest'
- name: Prebuild Linux_Mac
working-directory: ${{github.workspace}}
run: |
git submodule update --init --recursive
./prebuild.sh
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
- name: GCC11
run: echo "CXX=g++-11" >> $GITHUB_ENV
if: matrix.cc == 'gcc-11'
- name: Clang14
run: |
echo "CXX=clang++-14" >> $GITHUB_ENV
echo "CC=clang-14" >> $GITHUB_ENV
if: matrix.os == 'ubuntu-latest' && matrix.cc == 'clang-14'
- name: Clang15_Mac
run: |
echo "CXX=$(brew --prefix llvm@15)/bin/clang++" >> $GITHUB_ENV
echo "CC=$(brew --prefix llvm@15)/bin/clang" >> $GITHUB_ENV
if: matrix.os == 'macos-latest'
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DLIBCXX_ENABLE_INCOMPLETE_FEATURES=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: |
cmake --build . --config ${{ matrix.build_type }}
cmake --install . --config ${{ matrix.build_type }} --prefix ../artifacts
- name: Zip Folder (Win/Linux)
uses: papeloto/action-zip@v1
with:
files: artifacts/bin/
dest: ${{matrix.title}}.zip
recursive: false
if: (matrix.build_type == 'Release') && (matrix.cc != 'gcc') && (matrix.os != 'macos-latest')
- name: Zip Folder (Mac)
uses: papeloto/action-zip@v1
with:
files: artifacts/Rezonality.app
dest: ${{matrix.title}}.zip
recursive: true
if: (matrix.build_type == 'Release') && (matrix.os == 'macos-latest')
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ${{github.workspace}}/${{matrix.title}}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: startsWith(github.ref, 'refs/tags/') && (matrix.build_type == 'Release') && (matrix.title != 'Linux')
- name: Build Artifact Upload
uses: actions/upload-artifact@v1
with:
name: build-artifacts
path: ${{github.workspace}}/${{matrix.title}}.zip
if: (matrix.build_type == 'Release') && (matrix.title != 'Linux')