-
Notifications
You must be signed in to change notification settings - Fork 1
123 lines (106 loc) · 3.14 KB
/
release.yml
File metadata and controls
123 lines (106 loc) · 3.14 KB
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
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
jobs:
build-package:
name: Build and Package (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
triplet: x64-linux
artifact_name: x64-linux
- os: macos-14
triplet: arm64-osx
artifact_name: arm64-macos
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Checkout vcpkg
uses: actions/checkout@v4
with:
repository: microsoft/vcpkg
path: vcpkg
- name: Restore vcpkg cache
uses: actions/cache@v4
with:
path: |
~/.cache/vcpkg/archives
${{ github.workspace }}/vcpkg/downloads
key: vcpkg-${{ runner.os }}-${{ matrix.triplet }}-${{ hashFiles('vcpkg.json', 'CMakeLists.txt') }}
- name: Bootstrap vcpkg
shell: bash
run: ./vcpkg/bootstrap-vcpkg.sh
- name: Configure (Release)
shell: bash
run: |
cmake -S . -B build-release -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Build release binaries
shell: bash
run: |
cmake --build build-release --parallel --target \
igneous-mesh \
igneous-point \
igneous-diffusion \
igneous-spectral \
igneous-hodge \
bench_geometry \
bench_dod \
bench_pipelines
- name: Package tarball + checksums
shell: bash
run: |
mkdir -p dist
RAW_REF="${GITHUB_REF_NAME:-manual-${GITHUB_SHA::7}}"
SAFE_REF="${RAW_REF//\//-}"
ARCHIVE="igneous-${SAFE_REF}-${{ matrix.artifact_name }}"
tar -czf "dist/${ARCHIVE}.tar.gz" -C build-release \
igneous-mesh \
igneous-point \
igneous-diffusion \
igneous-spectral \
igneous-hodge \
bench_geometry \
bench_dod \
bench_pipelines
(
cd dist
shasum -a 256 "${ARCHIVE}.tar.gz" > "${ARCHIVE}.sha256"
)
- name: Upload package artifacts
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.artifact_name }}
path: dist/*
publish:
name: Publish GitHub Release
needs: build-package
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download packaged artifacts
uses: actions/download-artifact@v4
with:
pattern: release-*
path: release-assets
merge-multiple: true
- name: Publish release
uses: softprops/action-gh-release@v2
with:
files: release-assets/*
generate_release_notes: true