Repository navigation
104 lines (88 loc) · 3.21 KB
/
Copy pathcpp.yml
File metadata and controls
104 lines (88 loc) · 3.21 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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Test
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: OS ${{ matrix.os }} with BUILD_SHARED_LIBS=${{matrix.shared}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest, ubuntu-24.04-arm]
shared: [ON, OFF]
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
if: runner.os == 'Windows'
- name: Support longpaths
if: runner.os == 'Windows'
run: git config --system core.longpaths true
# cmake + a C/C++ compiler are preinstalled on the Linux/macOS runner images;
# we only install ninja, ccache, and the three codec libs. zlib is provided by
# the macOS SDK. Windows self-supplies zstd/zlib/lz4 via CMake FetchContent.
- name: Install deps (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y ninja-build ccache pkg-config \
zlib1g-dev libzstd-dev liblz4-dev
- name: Install deps (macOS)
if: runner.os == 'macOS'
run: brew install ninja ccache pkg-config zstd lz4
# ccache on Linux/macOS, sccache on Windows (ccache doesn't support MSVC).
# sccache caches both the FetchContent codec builds and carquet's objects.
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
variant: ${{ runner.os == 'Windows' && 'sccache' || 'ccache' }}
key: ${{ matrix.os }}-${{ matrix.shared }}
- name: Configure
shell: bash
env:
BUILD_SHARED_LIBS: ${{ matrix.shared }}
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
export CC=cl.exe CXX=cl.exe
# sccache can't cache MSVC /Zi PDBs, so build Release (no /Zi) here.
LAUNCHER="-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
BUILD_TYPE=Release
else
LAUNCHER="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
BUILD_TYPE=RelWithDebInfo
fi
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCARQUET_BUILD_SHARED=$BUILD_SHARED_LIBS \
-DCARQUET_BUILD_TESTS=ON \
$LAUNCHER
- name: Compile
run: cmake --build build --parallel
- name: Test
run: ctest --test-dir build -VV --rerun-failed --output-on-failure
redhat-build:
name: Rocky Linux 9
runs-on: ubuntu-latest
container:
image: rockylinux:9
steps:
- name: Install build dependencies
run: |
dnf install -y \
gcc gcc-c++ \
cmake make git \
pkgconf-pkg-config \
zlib-devel libzstd-devel lz4-devel
- uses: actions/checkout@v4
- name: Configure
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCARQUET_BUILD_TESTS=ON
- name: Compile
run: |
cmake --build build --parallel
- name: Test
run: |
ctest --test-dir build -VV --rerun-failed --output-on-failure