Skip to content

Commit bede0a0

Browse files
committed
Insert integration
1 parent 6692666 commit bede0a0

File tree

5 files changed

+313
-4
lines changed

5 files changed

+313
-4
lines changed

.github/workflows/linux.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: linux
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
7+
Build:
8+
name: ${{matrix.name}} (${{matrix.config}})
9+
runs-on: ${{matrix.os}}
10+
11+
env:
12+
CMAKE_GENERATOR: Ninja
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
name: [
18+
ubuntu-20.04-gcc-9,
19+
ubuntu-20.04-gcc-10,
20+
ubuntu-22.04-gcc-11,
21+
ubuntu-22.04-gcc-12,
22+
ubuntu-20.04-clang-8,
23+
ubuntu-20.04-clang-9,
24+
ubuntu-20.04-clang-10,
25+
ubuntu-22.04-clang-11,
26+
# ubuntu-22.04-clang-12,
27+
ubuntu-22.04-clang-13,
28+
ubuntu-22.04-clang-14
29+
]
30+
config: [Debug, Release]
31+
include:
32+
- name: ubuntu-20.04-gcc-9
33+
os: ubuntu-20.04
34+
compiler: gcc
35+
version: 9
36+
37+
- name: ubuntu-20.04-gcc-10
38+
os: ubuntu-20.04
39+
compiler: gcc
40+
version: 10
41+
42+
- name: ubuntu-22.04-gcc-11
43+
os: ubuntu-22.04
44+
compiler: gcc
45+
version: 11
46+
47+
- name: ubuntu-22.04-gcc-12
48+
os: ubuntu-22.04
49+
compiler: gcc
50+
version: 12
51+
52+
- name: ubuntu-20.04-clang-8
53+
os: ubuntu-20.04
54+
compiler: clang
55+
version: 8
56+
57+
- name: ubuntu-20.04-clang-9
58+
os: ubuntu-20.04
59+
compiler: clang
60+
version: 9
61+
62+
- name: ubuntu-20.04-clang-10
63+
os: ubuntu-20.04
64+
compiler: clang
65+
version: 10
66+
67+
- name: ubuntu-22.04-clang-11
68+
os: ubuntu-22.04
69+
compiler: clang
70+
version: 11
71+
72+
# - name: ubuntu-22.04-clang-12
73+
# os: ubuntu-22.04
74+
# compiler: clang
75+
# version: 12
76+
77+
- name: ubuntu-22.04-clang-13
78+
os: ubuntu-22.04
79+
compiler: clang
80+
version: 13
81+
82+
- name: ubuntu-22.04-clang-14
83+
os: ubuntu-22.04
84+
compiler: clang
85+
version: 14
86+
87+
steps:
88+
- uses: actions/checkout@v3
89+
90+
- name: Dependencies
91+
run: |
92+
sudo apt update
93+
sudo apt install -y ninja-build
94+
sudo apt install -y libicu-dev
95+
sudo apt install -y sqlite3
96+
97+
if [ "${{matrix.compiler}}" = "gcc" ]; then
98+
sudo apt install -y g++-${{matrix.version}}
99+
echo "CC=gcc-${{matrix.version}}" >> $GITHUB_ENV
100+
echo "CXX=g++-${{matrix.version}}" >> $GITHUB_ENV
101+
else
102+
sudo apt install -y clang-${{matrix.version}} lld-${{matrix.version}}
103+
sudo apt install -y libc++-${{matrix.version}}-dev libc++abi-${{matrix.version}}-dev
104+
echo "CC=clang-${{matrix.version}}" >> $GITHUB_ENV
105+
echo "CXX=clang++-${{matrix.version}}" >> $GITHUB_ENV
106+
fi
107+
108+
- name: Initialize CodeQL
109+
uses: github/codeql-action/init@v2
110+
with:
111+
languages: 'cpp'
112+
113+
- name: Create Build Environment
114+
run: cmake -E make_directory ${{runner.workspace}}/build
115+
116+
- name: Configure CMake
117+
working-directory: ${{runner.workspace}}/build
118+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE:STRING=${{matrix.config}} ${{matrix.cmake}}
119+
120+
- name: Build
121+
working-directory: ${{runner.workspace}}/build
122+
run: cmake --build . --config ${{matrix.config}}
123+
124+
- name: Test
125+
working-directory: ${{runner.workspace}}/build
126+
run: ctest --output-on-failure -C ${{matrix.config}}
127+
128+
- name: Perform CodeQL Analysis
129+
uses: github/codeql-action/analyze@v2

.github/workflows/macos.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: macos
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
7+
Build:
8+
name: ${{matrix.name}} (${{matrix.config}})
9+
runs-on: ${{matrix.os}}
10+
11+
env:
12+
CMAKE_GENERATOR: Ninja
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
name: [
18+
macos-12-xcode-13-x86_64,
19+
macos-12-xcode-13-arm64,
20+
macos-12-xcode-14-x86_64,
21+
macos-12-xcode-14-arm64
22+
]
23+
config: [Debug, Release]
24+
include:
25+
- name: macos-12-xcode-13-x86_64
26+
os: macos-12
27+
compiler: xcode
28+
version: "13.4"
29+
cmake: -DCMAKE_OSX_ARCHITECTURES:STRING=x86_64
30+
31+
- name: macos-12-xcode-13-arm64
32+
os: macos-12
33+
compiler: xcode
34+
version: "13.4"
35+
cmake: -DCMAKE_OSX_ARCHITECTURES:STRING=arm64
36+
37+
- name: macos-12-xcode-14-x86_64
38+
os: macos-12
39+
compiler: xcode
40+
version: "14.1"
41+
cmake: -DCMAKE_OSX_ARCHITECTURES:STRING=x86_64
42+
43+
- name: macos-12-xcode-14-arm64
44+
os: macos-12
45+
compiler: xcode
46+
version: "14.1"
47+
cmake: -DCMAKE_OSX_ARCHITECTURES:STRING=arm64
48+
49+
steps:
50+
- uses: actions/checkout@v3
51+
52+
- name: Dependencies
53+
run: |
54+
brew install ninja
55+
brew install icu4c
56+
brew install sqlite
57+
58+
if [ "${{matrix.compiler}}" = "gcc" ]; then
59+
brew install gcc@${{matrix.version}}
60+
echo "CC=gcc-${{matrix.version}}" >> $GITHUB_ENV
61+
echo "CXX=g++-${{matrix.version}}" >> $GITHUB_ENV
62+
fi
63+
if [ "${{matrix.compiler}}" = "xcode" ]; then
64+
ls -ls /Applications/
65+
sudo xcode-select -switch /Applications/Xcode_${{matrix.version}}.app
66+
echo "CC=clang" >> $GITHUB_ENV
67+
echo "CXX=clang++" >> $GITHUB_ENV
68+
fi
69+
70+
- name: Initialize CodeQL
71+
uses: github/codeql-action/init@v2
72+
with:
73+
languages: 'cpp'
74+
75+
- name: Create Build Environment
76+
run: cmake -E make_directory ${{runner.workspace}}/build
77+
78+
- name: Configure CMake
79+
working-directory: ${{runner.workspace}}/build
80+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE:STRING=${{matrix.config}} ${{matrix.cmake}}
81+
82+
- name: Build
83+
working-directory: ${{runner.workspace}}/build
84+
run: cmake --build . --config ${{matrix.config}}
85+
86+
# arm64 mac runner are not able to start the tests: [Unknown system error -86]
87+
- name: Test
88+
working-directory: ${{runner.workspace}}/build
89+
run: |
90+
if [ "${{matrix.cmake}}" != "-DCMAKE_OSX_ARCHITECTURES:STRING=arm64" ]; then
91+
ctest --output-on-failure -C ${{matrix.config}}
92+
fi
93+
94+
- name: Perform CodeQL Analysis
95+
uses: github/codeql-action/analyze@v2

.github/workflows/windows.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: windows
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
7+
Build:
8+
name: ${{matrix.name}} (${{matrix.config}})
9+
runs-on: ${{matrix.os}}
10+
11+
env:
12+
CMAKE_GENERATOR: Ninja
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
name: [
18+
windows-2019-msvc2019,
19+
# windows-2019-msvc2019-clang,
20+
windows-2022-msvc2022
21+
# windows-2022-msvc2022-clang
22+
]
23+
config: [Debug, Release]
24+
include:
25+
- name: windows-2019-msvc2019
26+
os: windows-2019
27+
compiler: cl
28+
version: Visual Studio 16 2019
29+
30+
# clang-tools are not installed
31+
# - name: windows-2019-msvc2019-clang
32+
# os: windows-2019
33+
# compiler: cl
34+
# version: Visual Studio 16 2019
35+
# toolchain: -T clang-cl
36+
37+
- name: windows-2022-msvc2022
38+
os: windows-2022
39+
compiler: cl
40+
version: Visual Studio 17 2022
41+
42+
# clang-tools are not installed
43+
# - name: windows-2022-msvc2022-clang
44+
# os: windows-2022
45+
# compiler: cl
46+
# version: Visual Studio 17 2022
47+
# toolchain: -T clang-cl
48+
49+
steps:
50+
- uses: actions/checkout@v3
51+
52+
- name: Dependencies
53+
run: |
54+
if ( "${{matrix.compiler}}" -eq "gcc" ) {
55+
choco install ninja
56+
echo "CC=gcc" >> $Env:GITHUB_ENV
57+
echo "CXX=g++" >> $Env:GITHUB_ENV
58+
}
59+
elseif ( "${{matrix.compiler}}".StartsWith( "clang" ) ) {
60+
choco install ninja
61+
echo "CC=clang" >> $Env:GITHUB_ENV
62+
echo "CXX=clang++" >> $Env:GITHUB_ENV
63+
}
64+
65+
- name: Initialize CodeQL
66+
uses: github/codeql-action/init@v2
67+
with:
68+
languages: 'cpp'
69+
70+
- name: Create Build Environment
71+
run: cmake -E make_directory ${{runner.workspace}}/build
72+
73+
- name: Configure CMake
74+
working-directory: ${{runner.workspace}}/build
75+
run: cmake $Env:GITHUB_WORKSPACE -G"${{matrix.version}}" ${{matrix.toolchain}} -DCMAKE_BUILD_TYPE:STRING=${{matrix.config}}
76+
77+
- name: Build
78+
working-directory: ${{runner.workspace}}/build
79+
run: cmake --build . --config ${{matrix.config}}
80+
81+
- name: Test
82+
working-directory: ${{runner.workspace}}/build
83+
run: ctest --output-on-failure -C ${{matrix.config}}
84+
85+
- name: Perform CodeQL Analysis
86+
uses: github/codeql-action/analyze@v2

cmake/find_package.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,4 @@ elseif(APPLE)
4343
endif()
4444
find_package(ICU 70 COMPONENTS i18n uc)
4545

46-
#if(APPLE)
47-
# /usr/local/opt/sqlite3
48-
#endif()
4946
find_package(SQLite3)

source/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
project(sqlite_functions)
3232

3333
add_library(${PROJECT_NAME}
34-
# ../.github/workflows/integrate.yml
34+
../.github/workflows/linux.yml
35+
../.github/workflows/macos.yml
36+
../.github/workflows/windows.yml
3537
../README.md
3638
SqliteError.h
3739
SqliteUtils.cpp

0 commit comments

Comments
 (0)