-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (84 loc) · 2.46 KB
/
gcc.yml
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
name: GCC
on: push
jobs:
gcc:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- version: 9
os: ubuntu-22.04
- version: 10
os: ubuntu-22.04
- version: 11
os: ubuntu-22.04
- version: 12
os: ubuntu-22.04
- version: 13
os: ubuntu-24.04
- version: 14
os: ubuntu-24.04
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
- name: Install Debian packages
run: |
sudo apt-get update
sudo apt-get install -y catch2 cmake g++-${{ matrix.version }} libfuse3-dev liblz4-dev pkg-config zlib1g-dev
- name: Syntax check
run: |
export CXX=g++-${{ matrix.version }}
export CFLAGS=-D_FILE_OFFSET_BITS=64
./ci/cpplint.sh
if: matrix.version == 12
- name: Build with GCC ${{ matrix.version }}
run: |
export CXX=g++-${{ matrix.version }}
export CC=gcc-${{ matrix.version }}
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake ../
make -j2
- name: Tests
run: |
cd "$GITHUB_WORKSPACE"/build
ctest -V
- name: Build without LZ4 support on GCC ${{ matrix.version }}
run: |
export CXX=g++-${{ matrix.version }}
export CC=gcc-${{ matrix.version }}
cd $GITHUB_WORKSPACE
mkdir build-no-lz4
cd build-no-lz4
cmake ../ -DAUTODETECT_LZ4=OFF -DDISABLE_LZ4=ON
make -j2
if: matrix.version == 9
- name: Test build without LZ4 support
run: |
cd "$GITHUB_WORKSPACE"/build-no-lz4
ctest -V
if: matrix.version == 9
gcc_lto_static:
runs-on: ubuntu-22.04
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
- name: Install Debian packages
run: |
sudo apt-get update
sudo apt-get install -y catch2 cmake g++-12 libfuse3-dev liblz4-dev pkg-config zlib1g-dev
- name: Build with GCC 12
run: |
export CXX=g++-12
export CC=gcc-12
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake -DENABLE_LTO=ON -DENABLE_STATIC_LINKING=ON ../
make -j2
- name: Tests
run: |
cd "$GITHUB_WORKSPACE"/build
ctest -V