Skip to content

Commit f5d62a0

Browse files
authored
Use Gihub Actions as CI (#230)
1 parent 5a5fd24 commit f5d62a0

3 files changed

Lines changed: 95 additions & 102 deletions

File tree

.github/workflows/ci.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
name: ${{matrix.name}}
12+
runs-on: ${{matrix.os}}
13+
container: ${{matrix.container}}
14+
env:
15+
CC: ${{matrix.cc}}
16+
CXX: ${{matrix.cxx}}
17+
defaults:
18+
run:
19+
shell: bash
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- name: gcc-6
25+
cc: gcc-6
26+
cxx: g++-6
27+
os: ubuntu-latest
28+
container: ubuntu:18.04
29+
30+
- name: gcc-12
31+
cc: gcc-12
32+
cxx: g++-12
33+
os: ubuntu-latest
34+
container: ubuntu:22.04
35+
# We need relaxed builds for debug mode with current GCC versions, see #218.
36+
build_options: "relaxed_build=on"
37+
38+
- name: clang-15
39+
cc: clang-15
40+
cxx: clang++-15
41+
os: ubuntu-latest
42+
container: ubuntu:22.04
43+
44+
- name: clang-macOS
45+
cc: clang
46+
cxx: clang++
47+
os: macos-latest
48+
49+
steps:
50+
- uses: actions/checkout@v3
51+
52+
- name: Setup (macOS)
53+
if: matrix.name == 'clang-macOS'
54+
run: |
55+
brew install bison flex
56+
echo "BISON=$(brew --prefix bison)/bin/bison" >> $GITHUB_ENV
57+
echo "FLEX=$(brew --prefix flex)/bin/flex" >> $GITHUB_ENV
58+
59+
- name: Setup (Ubuntu)
60+
if: matrix.name != 'clang-macOS'
61+
run: |
62+
apt-get update
63+
apt-get install --no-install-recommends -y bison flex ${CC} ${CXX} make valgrind
64+
echo "BISON=bison" >> $GITHUB_ENV
65+
echo "FLEX=flex" >> $GITHUB_ENV
66+
67+
- name: System Information
68+
run: |
69+
awk -v a=$(uname) 'BEGIN { a == "Linux" ? system("cat /etc/issue") : system("sw_vers") }'
70+
${CC} --version
71+
${CXX} --version
72+
${BISON} --version
73+
${FLEX} --version
74+
awk -v a=$(uname) 'BEGIN { if (a == "Linux") system("valgrind --version") }'
75+
76+
- name: Build Parser
77+
run: |
78+
make -j $(nproc)
79+
BISON=${BISON} FLEX=${FLEX} make test
80+
make test_example
81+
82+
- name: Build Parser and Lexer from Scratch
83+
run: |
84+
BISON=${BISON} FLEX=${FLEX} make cleanall
85+
BISON=${BISON} FLEX=${FLEX} make -j $(nproc)
86+
BISON=${BISON} FLEX=${FLEX} make test
87+
make test_example
88+
89+
- name: Build Parser and Lexer from Scratch (Debug)
90+
run: |
91+
BISON=${BISON} FLEX=${FLEX} make cleanall
92+
BISON=${BISON} FLEX=${FLEX} make -j $(nproc) mode=debug ${{matrix.build_options}}
93+
BISON=${BISON} FLEX=${FLEX} make test
94+
make test_example

.travis.yml

Lines changed: 0 additions & 101 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
C++ SQL Parser
22
=========================
3-
[![Build Status](https://app.travis-ci.com/hyrise/sql-parser.svg?branch=master)](https://app.travis-ci.com/github/hyrise/sql-parser)
3+
[![Build Status](https://github.com/hyrise/sql-parser/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/hyrise/sql-parser/actions?query=branch%3Amaster)
44

55

66
This is a SQL Parser for C++. It parses the given SQL query into C++ objects.

0 commit comments

Comments
 (0)