-
Notifications
You must be signed in to change notification settings - Fork 111
61 lines (50 loc) · 1.92 KB
/
create-release-build.yaml
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
# This workflow is to create a release with prebuilt create_llvm_prof binary.
name: Create Release Build
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
# Manual trigger using the Actions page.
workflow_dispatch:
jobs:
build_release:
runs-on: ubuntu-22.04-8core
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
ref: '${{github.ref}}'
- name: Install Dependencies
run: sudo apt-get -y install libunwind-dev libgflags-dev libssl-dev libelf-dev protobuf-compiler libzstd-dev
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DENABLE_TOOL=LLVM -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -S ${{github.workspace}}
- name: Build
# Build your program with the given configuration
run: make -C ${{github.workspace}}/build -j8
- name: Run Tests
run: make -C ${{github.workspace}}/build test
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
tag_name: ${{github.ref}}
release_name: ${{github.ref_name}}
body_path: "${{github.workspace}}/RELEASE.md"
draft: false
prerelease: false
- name: Create Zip Package
run: |
zip --junk-paths create_llvm_prof-x86_64-${{github.ref_name}}.zip ${{github.workspace}}/build/create_llvm_prof
- name: Upload Release Asset
id: 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: create_llvm_prof-x86_64-${{github.ref_name}}.zip
asset_name: create_llvm_prof-x86_64-${{github.ref_name}}.zip
asset_content_type: application/zip