forked from MonetDB/MonetDB
-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (121 loc) · 4.16 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
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
132
133
134
135
name: MonetDB build and test
on:
push:
branches:
- 'branches/*'
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: '15 1 * * *'
jobs:
test:
strategy:
fail-fast: false # don't stop other jobs
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
c_compiler: [ gcc, clang, cl ]
include:
- os: windows-latest
c_compiler: cl
- os: macos-latest
c_compiler: clang
- os: macos-latest
c_compiler: gcc-12
- os: ubuntu-latest
c_compiler: gcc
- os: ubuntu-latest
c_compiler: clang
exclude:
- os: windows-latest
c_compiler: gcc
- os: windows-latest
c_compiler: clang
- os: macos-latest
c_compiler: cl
- os: macos-latest
c_compiler: gcc
- os: ubuntu-latest
c_compiler: cl
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: install pymonetdb cryptography
run: pip3 install pymonetdb cryptography
- name: make MonetDB on linux
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$HOME/MDB \
-DPY3INTEGRATION=OFF \
-DRINTEGRATION=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DASSERT=OFF \
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
-DCMAKE_SUMMARY=ON
make install -j3
if: runner.os == 'Linux'
- name: brew packages
run: brew install bison
if: runner.os == 'macOS'
- name: make MonetDB on macos
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$HOME/MDB \
-DPY3INTEGRATION=OFF \
-DRINTEGRATION=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DASSERT=OFF \
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison \
-DCMAKE_SUMMARY=ON
make install -j3
if: runner.os == 'macOS'
- name: choco packages
run: |
choco install winflexbison3
vcpkg install libiconv bzip2 libxml2 pcre zlib getopt
if: runner.os == 'Windows'
- name: make MonetDB on Windows
shell: pwsh
run: |
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=C:\MDB -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DPY3INTEGRATION=OFF -DRINTEGRATION=OFF -DCMAKE_BUILD_TYPE=Release -DASSERT=OFF -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_SUMMARY=ON
cmake --build . --target install
if: runner.os == 'Windows'
- name: ctest
run: |
cd build
cmake --build . --target ${{ runner.os == 'Windows' && 'RUN_TESTS' || 'test' }}
if: runner.os != 'Windows'
- name: mtest
run: |
PATH=$HOME/MDB/bin:$PATH $HOME/MDB/bin/Mtest.py -r --debug=0 --ci --no-html --TSTTRGBASE=.
if: runner.os != 'Windows'
- name: ctest
shell: pwsh
run: |
$env:PATH = 'C:\MDB\lib;C:\MDB\lib\monetdb5;C:\MDB\bin;C:\vcpkg\installed\x64-windows\bin;C:\vcpkg\installed\x64-windows\debug\bin;' + $env:PATH
cd build
cmake --build . --target ${{ runner.os == 'Windows' && 'RUN_TESTS' || 'test' }}
if: runner.os == 'Windows'
- name: mtest
shell: pwsh
run: |
$env:PATH = 'C:\MDB\lib;C:\MDB\lib\monetdb5;C:\MDB\bin;C:\vcpkg\installed\x64-windows\bin;C:\vcpkg\installed\x64-windows\debug\bin;' + $env:PATH
python C:\MDB\bin\Mtest.py -r --debug=0 --ci --no-html --TSTTRGBASE=.
if: runner.os == 'Windows'
- name: Tar files
run: tar -cvf mtests.tar mTests
- name: Publish mtest results
uses: actions/upload-artifact@v4
with:
name: mtest-${{ github.sha }}-${{ matrix.os }}-${{ matrix.c_compiler }}
path: mtests.tar