-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (53 loc) · 1.72 KB
/
Copy pathbuild-linux.yml
File metadata and controls
55 lines (53 loc) · 1.72 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
name: Build on Linux
on:
workflow_call:
inputs:
build-type:
description: The build type. Can be one of "Debug" or "Release". Defaults to "Release".
type: string
required: true
default: Release
store-output:
description: Whether the build should be stored. (Useful for release builds). Defaults to false.
type: boolean
required: true
default: false
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: KyleMayes/install-llvm-action@v1
with:
version: 15
- name: Install X11 dependency
run: |
sudo apt install -y libx11-dev
- name: Build browsercontrol library
run: |
mkdir build
cd build
cmake -G Ninja -DUSE_CEF_MINIMAL_DISTRIBUTION=ON -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} ../
ninja
- name: Package assets
if: ${{ inputs.store-output }}
id: package-assets
working-directory: ./build/output
run: |
mkdir ./dist
llvm-strip -x *.so*
jar cf browsercontrol.jar ./libbrowsercontrol.so
CKSUM=$( python ${{ github.workspace }}/scripts/checksum.py browsercontrol.jar)
mv browsercontrol.jar ./dist/browsercontrol_3_1_$CKSUM.jar
tar --exclude='./dist' -c --lzma -hf ./dist/cef_dependencies.tar.lz ./*
- uses: actions/upload-artifact@v4
if: ${{ inputs.store-output }}
with:
name: linux-x64
path: ./build/output/dist/
if-no-files-found: error