-
Notifications
You must be signed in to change notification settings - Fork 21
115 lines (101 loc) · 3.02 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
name: Release
on:
workflow_dispatch:
jobs:
source_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Source release
shell: bash
working-directory: ../
run: |
cmake -P bmx/release/source_release.cmake
# actions/upload-artifact doesn't allow . and .. in paths
- name: Move source artefacts into working directory
shell: bash
run: |
mv ../source_release .
- name: Upload source release
uses: actions/upload-artifact@v4
with:
name: source-release
path: |
source_release/*.zip
source_release/*.tar.gz
binary_release:
strategy:
fail-fast: false
matrix:
include:
- name: windows
os: windows-2019
- name: macos-xcode-universal
os: macos-13
- name: ubuntu
os: ubuntu-latest
runs-on: ${{ matrix.os }}
needs: source_release
steps:
- name: Install dependencies (ubuntu)
if: ${{ contains(matrix.os, 'ubuntu') }}
shell: bash
run: |
sudo apt-get -y update
sudo apt-get -y install \
git \
pkg-config \
g++ \
gcc \
cmake \
uuid-dev \
libcurl4-openssl-dev
- uses: maxim-lobanov/setup-xcode@v1
if: ${{ contains(matrix.name, 'xcode') }}
with:
xcode-version: latest-stable
- uses: actions/download-artifact@v4
with:
name: source-release
- name: Win64 binary release
if: ${{ contains(matrix.name, 'windows') }}
shell: bash
run: |
mkdir binary_release
cd binary_release
unzip -q ../bmx-*.zip
cd bmx-*
cmake -P release/win64_binary_release.cmake
- name: MacOS Universal binary release
if: ${{ contains(matrix.os, 'macos') }}
shell: bash
run: |
mkdir binary_release
cd binary_release
unzip -q ../bmx-*.zip
cd bmx-*
cmake -P release/macos_universal_binary_release.cmake
- name: Ubuntu binary build (build only, no artefacts)
if: ${{ contains(matrix.os, 'ubuntu') }}
shell: bash
run: |
mkdir binary_release
cd binary_release
tar -xzf ../bmx-*.tar.gz
cd bmx-*
cmake -P release/ubuntu_binary_release_build_only.cmake
# actions/upload-artifact doesn't allow . and .. in paths
- name: Move binary artefacts into binary_release directory
if: ${{ !contains(matrix.os, 'ubuntu') }}
shell: bash
run: |
mv binary_release/bmx-*/out/package/bmx-*.zip ./binary_release
- name: Upload binary release
if: ${{ !contains(matrix.os, 'ubuntu') }}
uses: actions/upload-artifact@v4
with:
name: binary-release-${{ matrix.name }}
path: |
binary_release/bmx-*.zip