blob: 3657d211a35e1d303c5f364770ae781d4bb803a1 (
plain)
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
|
name: "libnbtplusplus: CI"
on:
workflow_dispatch:
workflow_call:
permissions:
contents: read
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
shared: [ON, OFF]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install zlib (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev
- name: Install zlib (macOS)
if: runner.os == 'macOS'
run: brew install zlib
- uses: ilammy/msvc-dev-cmd@v1
if: runner.os == 'Windows'
- name: Configure
run: |
cmake -S libnbtplusplus -B build \
-DCMAKE_BUILD_TYPE=Release \
-DNBT_BUILD_SHARED=${{ matrix.shared }} \
-DNBT_USE_ZLIB=ON \
-DNBT_BUILD_TESTS=ON
- name: Build
run: cmake --build build --config Release -j2
- name: Test
run: ctest --test-dir build -C Release --output-on-failure
lint-reuse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v6
|