-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (41 loc) · 1.45 KB
/
linux.yml
File metadata and controls
43 lines (41 loc) · 1.45 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
name: Linux Compile
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
config: [Release, Debug]
standalone: [OFF, ON]
toolchain: [linux-gnu, linux-clang]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install cmake ninja-build libbz2-dev
- name: Build
run: |
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DPRISM_STANDALONE=${{ matrix.standalone }} -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/${{ matrix.toolchain }}.cmake
cmake --build build-cmake -j
- name: Create Package
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' && matrix.toolchain == 'linux-gnu' }}
run: |
mkdir prism-release
cp build-cmake/prism prism-release/
cp "$(ldconfig -p | grep libbz2.so.1.0 | tr ' ' '\n' | grep /| head -n1)" prism-release/
- name: Publish packaged artifacts
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' && matrix.toolchain == 'linux-gnu' }}
uses: actions/upload-artifact@v4
with:
name: prism-linux-x64
path: prism-release
- name: Test
continue-on-error: true
run: |
cd build-cmake
ctest -j
- name: Echo Test Results
run: cat build-cmake/Testing/Temporary/LastTest.log