Repository navigation
68 lines (58 loc) · 1.71 KB
/
Copy pathlinux.yml
File metadata and controls
68 lines (58 loc) · 1.71 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
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
name: linux
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read # to fetch code (actions/checkout)
actions: read # to query GitHub Actions cache usage
jobs:
build:
name: ${{ matrix.name }}
runs-on: ubuntu-24.04
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
include:
- name: static
shared: 'OFF'
- name: shared
shared: 'ON'
env:
SCCACHE_GHA_ENABLED: "on"
steps:
- uses: actions/checkout@v6
- name: Set up sccache
uses: mozilla-actions/sccache-action@v0.0.10
with:
version: "v0.14.0"
# Whatever the runner already has is used; the rest is fetched or built by
# the CMake build itself, so there is no dependency install step. OpenSSL
# is optional; FOLLY_BUILD_OPENSSL builds it if the runner lacks it, so the
# TLS libraries are tested too.
- name: Configure
run: >
cmake -B build
-DFOLLY_BUILD_OPENSSL=ON
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DBUILD_SHARED_LIBS=${{ matrix.shared }}
-DBUILD_TESTS=ON
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
# A bare -j starts every ready compile at once, which on a cold cache
# exhausts the runner's memory.
- name: Build
run: cmake --build build -j "$(nproc)"
- name: Test
run: ctest --test-dir build --output-on-failure
- name: Show sccache stats
if: always()
run: sccache --show-stats