-
Notifications
You must be signed in to change notification settings - Fork 9
131 lines (115 loc) · 3.9 KB
/
ci.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: CI
on:
push:
pull_request:
branches: [main]
env:
BUILD_TYPE: Release
INSTALL_LOCATION: .local
jobs:
build:
strategy:
fail-fast: false
matrix:
boost_version: [1.81.0, 1.82.0, 1.83.0, 1.84.0, 1.85.0, 1.86.0]
shared: [ON, OFF]
toolchain:
[
{
name: "Ubuntu GCC TLS",
cxx: "g++",
cc: "gcc",
packages: "libssl-dev",
tls: ON,
os: ubuntu-latest,
},
{
name: "Ubuntu GCC",
cxx: "g++",
cc: "gcc",
packages: "",
tls: OFF,
os: ubuntu-latest,
},
{
name: "Ubuntu Clang TLS",
cxx: "clang++",
cc: "clang",
packages: "libssl-dev",
tls: ON,
os: ubuntu-latest,
},
{
name: "Ubuntu Clang",
cxx: "clang++",
cc: "clang",
packages: "",
tls: OFF,
os: ubuntu-latest,
},
{
name: "VS2022",
cxx: "cl.exe",
cc: "cl.exe",
tls: OFF,
packages: "openssl", # We have to install something
os: windows-latest,
},
]
continue-on-error: false
runs-on: ${{ matrix.toolchain.os }}
env:
Boost_ROOT: ${{github.workspace}}/3rdparty/boost-${{ matrix.boost_version }}
CC: ${{ matrix.toolchain.cc }}
CXX: ${{ matrix.toolchain.cxx }}
name: "${{ matrix.toolchain.name }} (boost v${{ matrix.boost_version }}) (shared: ${{ matrix.shared }})"
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v4
- name: cache boost
uses: actions/cache@v4
id: cache-boost
with:
path: ${{ env.Boost_ROOT }}
key: boost-${{ matrix.boost_version }}
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Setup boost env
run: |
BOOST_URL="https://boostorg.jfrog.io/artifactory/main/release/${{ matrix.boost_version }}/source/boost_$(echo ${{ matrix.boost_version }} | sed 's/\./_/g').tar.bz2"
echo "BOOST_URL=$BOOST_URL" >> $GITHUB_ENV
shell: bash
- name: Install packages (via choco)
if: runner.os == 'Windows'
run: choco upgrade ${{ matrix.toolchain.packages }}
- name: Install packages (via apt)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install ${{ matrix.toolchain.packages }} -y
- name: Install packages (via homebrew)
if: runner.os == 'macOS'
run: brew install ${{ matrix.toolchain.packages }}
- name: Install Boost
if: steps.cache-boost.outputs.cache-hit != 'true'
run: |
if [ "$OS" == "Windows_NT" ]; then
# fix up paths to be forward slashes consistently
Boost_ROOT=$(echo $Boost_ROOT | sed 's/\\/\//g')
fi
mkdir -p $Boost_ROOT
curl --progress-bar --location --output $Boost_ROOT/download.tar.bz2 $BOOST_URL
7z -o$Boost_ROOT x $Boost_ROOT/download.tar.bz2 -y -bd
7z -o$Boost_ROOT x $Boost_ROOT/download.tar -y -bd
cd $Boost_ROOT && cp -r boost_*/* .
rm -rf boost_*/* download.tar.bz2 download.tar
shell: bash
- name: Install msvc
if: ${{ matrix.toolchain.cxx == 'cl.exe' }} # This is a bit of a hack
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
run: cmake -Bbuild -GNinja -DMALLOY_BUILD_EXAMPLES=ON -DMALLOY_BUILD_TESTS=ON -DMALLOY_FEATURE_TLS=${{ matrix.toolchain.tls }} -DMALLOY_BUILD_SHARED=${{ matrix.shared }}
- name: Build
run: cmake --build build
- name: Run tests
run: ./build/bin/malloy-tests