-
Notifications
You must be signed in to change notification settings - Fork 77
71 lines (63 loc) · 2.35 KB
/
linux.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
name: Linux
on: [push]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout submodules using a PAT
run: |
git config --file .gitmodules --get-regexp url | while read url; do
git config --file=.gitmodules $(echo "$url" | sed -E "s/[email protected]:|https:\/\/github.com\//https:\/\/${{ secrets.CI_PAT }}:${{ secrets.CI_PAT }}@github.com\//")
done
git submodule sync
git submodule update --init --recursive
- name: CacheCMake
uses: actions/[email protected]
with:
path: cmake-3.20.0-rc3
key: ${{ runner.os }}-cmake-3.20.0-rc3
- name: Build Environment
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test;
sudo apt-get install g++-10 gcc-10;
sudo apt-get update;
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10;
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-10 10;
sudo update-alternatives --set cc /usr/bin/gcc;
sudo update-alternatives --set c++ /usr/bin/g++;
sudo rm /usr/bin/gcc;
sudo rm /usr/bin/g++;
sudo ln -s /usr/bin/gcc-10 /usr/bin/gcc;
sudo ln -s /usr/bin/g++-10 /usr/bin/g++;
cd ..;
if ! test -d cmake-3.20.0-rc3; then
wget https://github.com/Kitware/CMake/releases/download/v3.20.0-rc3/cmake-3.20.0-rc3.tar.gz;
tar -xf cmake-3.20.0-rc3.tar.gz;
cd cmake-3.20.0-rc3;
./configure;
make -j16;
cd ..;
else
echo "Found cmake in cache!"
fi;
cd cmake-3.20.0-rc3;
sudo make install;
cd ..;
- name: Build dbcppp
run: |
mkdir build;
cd build;
cmake -DCMAKE_BUILD_TYPE=Release ..;
make -j6;
- name: RunTests
run: |
cd build;
make RunTests;