MonetDB build and test #119
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |