-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (72 loc) · 2.33 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
name: Build and Release
on:
workflow_dispatch:
inputs:
versionTag:
description: 'Version tag in release name'
required: false
type: string
default: 'v0.0.'
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
#os: [windows-latest, ubuntu-latest]
os: [ubuntu-latest]
include:
# - os: windows-latest
# suffix: win64
- os: ubuntu-latest
suffix: linux64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install CMake
uses: lukka/get-cmake@latest
- name: Install LLVM/Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: '17'
env: 1
- name: Symlink libclang.so (Linux)
if: contains(matrix.os, 'ubuntu')
run: sudo ln -s libclang-11.so.1 /lib/x86_64-linux-gnu/libclang.so
working-directory: ${{ env.LLVM_PATH }}/lib
- name: Configure CMake (Windows)
if: runner.os == 'Windows'
run: cmake -B build -DREFLECT_BUILD_EXAMPLE=OFF -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
- name: Configure CMake (Linux)
if: runner.os != 'Windows'
run: CC=clang CXX=clang++ cmake -B build -DREFLECT_BUILD_EXAMPLE=OFF -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCXX_STANDARD=20
- name: Build
run: cmake --build build
- name: Archive and upload artifacts
run: |
mkdir artifacts
find build/bin -type f -exec cp {} artifacts/{}_$(echo ${{ matrix.suffix }}) \;
shell: bash
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ inputs.versionTag }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/
asset_name: ${{ matrix.os }}-artifacts.zip
asset_content_type: application/zip