Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update library dependencies #27

Merged
merged 14 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 1 addition & 96 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -66,101 +66,6 @@ ForEachMacros:
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"[a-zA-Z0-9_]*\.'
Priority: 1
SortPriority: 1
- Regex: '^"testutils/'
Priority: 2
SortPriority: 2
- Regex: '^"tron/'
Priority: 2
SortPriority: 3
- Regex: '^"fmi/'
Priority: 2
SortPriority: 4
- Regex: '^"verifier/'
Priority: 2
SortPriority: 5
- Regex: '^"cora/'
Priority: 2
SortPriority: 6
- Regex: '^"tiga/'
Priority: 2
SortPriority: 7
- Regex: '^"statmc/'
Priority: 2
SortPriority: 8
- Regex: '^"xmltrace/'
Priority: 2
SortPriority: 9
- Regex: '^"pipeline/'
Priority: 2
SortPriority: 10
- Regex: '^"protocol/'
Priority: 2
SortPriority: 11
- Regex: '^"storage/'
Priority: 2
SortPriority: 12
- Regex: '^"system/'
Priority: 2
SortPriority: 13
- Regex: '^"dbm/'
Priority: 2
SortPriority: 14
- Regex: '^"cdd/'
Priority: 2
SortPriority: 15
- Regex: '^"polyhedra/'
Priority: 2
SortPriority: 16
- Regex: '^"tracer/'
Priority: 2
SortPriority: 17
- Regex: '^"utap/'
Priority: 2
SortPriority: 18
- Regex: '^"io/'
Priority: 2
SortPriority: 19
- Regex: '^"formats/'
Priority: 2
SortPriority: 20
- Regex: '^"base/'
Priority: 2
SortPriority: 21
- Regex: '^"hash/'
Priority: 2
SortPriority: 22
- Regex: '^"debug/'
Priority: 2
SortPriority: 23
- Regex: '^<libstrategy/'
Priority: 3
SortPriority: 24
- Regex: '^<licensing/'
Priority: 3
SortPriority: 25
- Regex: '^<prlearn/'
Priority: 3
SortPriority: 26
- Regex: '^<ap_'
Priority: 3
SortPriority: 27
- Regex: '^<libxml/'
Priority: 3
SortPriority: 28
- Regex: '^<boost/'
Priority: 3
SortPriority: 29
- Regex: '^<[a-bd-z0-9][a-z0-9_]*(\.[a-z]*)?>$'
Priority: 4
SortPriority: 30
- Regex: '^<c'
Priority: 4
SortPriority: 31
#IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: false
IndentPPDirectives: None
IndentWidth: 4
Expand Down Expand Up @@ -213,7 +118,7 @@ RawStringFormats:
- ParseTextProtoOrDie
CanonicalDelimiter: ''
ReflowComments: true
SortIncludes: true
SortIncludes: false
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/build-nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Build on NIX

on:
workflow_dispatch:

jobs:
build-nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build and test
run: nix build -L
build-nix-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build and test
run: nix build -L
build-nix-cross:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build and test
run: nix build -L .\#packages.crossPackage.x86_64-linux
171 changes: 87 additions & 84 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Build and Test
---
name: Build

on:
push:
Expand All @@ -7,107 +8,109 @@ on:
branches: [ main ]

jobs:
format:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Format
run: find src include test -iregex '.*\.\(c\|h\|cpp\|hpp\|cc\|hh\|cxx\|hxx\)$' | xargs clang-format -n -Werror
build-linux-win:
- uses: actions/checkout@v3
- name: Formatting
run: find src include test -iregex '.*\.\(c\|h\|cpp\|hpp\|cc\|hh\|cxx\|hxx\)$' | xargs clang-format -n -Werror
build-linux:
strategy:
fail-fast: false
matrix:
target: [mingw, ubuntu]
target: [x86_64-w64-mingw32, x86_64-linux]
sanitizers: [ON, OFF]
newdbm: [ON, OFF]
exclude:
- target: mingw
- target: x86_64-w64-mingw32
sanitizers: ON
runs-on: ubuntu-latest
env:
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/cmake/toolchain/${{ matrix.target }}.cmake
CMAKE_BUILD_TYPE: Release
CTEST_OUTPUT_ON_FAILURE: 1
CTEST_TEST_TIMEOUT: 20
STATIC: OFF
steps:
- uses: actions/checkout@v2
- name: Set default environment variables
run: echo "STATIC=OFF" >> "$GITHUB_ENV"
- name: Set mingw environment variables
if: matrix.target == 'mingw'
run: |
echo "CMAKE_TOOLCHAIN_FILE=$(pwd)/toolchains/mingw.cmake" >> "$GITHUB_ENV"
echo "STATIC=ON" >> "$GITHUB_ENV"
- name: Get ubuntu dependencies
if: matrix.target == 'ubuntu'
run: |
sudo apt-get update
sudo apt-get install libboost-all-dev doctest-dev
- name: Get mingw dependencies
if: matrix.target == 'mingw'
run: |
sudo apt-get update
sudo apt-get install cmake make g++-mingw-w64-x86-64 mingw-w64-x86-64-dev mingw-w64-tools wine wine-binfmt
- uses: actions/checkout@v3
- name: Install MinGW64 cross-compiler and wine
if: matrix.target == 'x86_64-w64-mingw32'
run: |
sudo apt-get -qqy update
sudo apt-get -qqy install cmake make g++-mingw-w64-x86-64 mingw-w64-x86-64-dev mingw-w64-tools wine wine-binfmt
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- name: Getlibs
run: ./getlibs.sh
- name: Build and test
run: |
export CTEST_OUTPUT_ON_FAILURE=1
cmake -DUDBM_WITH_TESTS=ON -DUDBM_STATIC=$STATIC -DASAN=${{ matrix.sanitizers }} -DUBSAN=${{ matrix.sanitizers }} -DCMAKE_BUILD_TYPE=Release -DENABLE_DBM_NEW=${{ matrix.newdbm }} -DCMAKE_PREFIX_PATH=$(pwd)/local -B build -S .
cmake --build build
(cd build ; ctest)
build-win-native:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Get dependencies
run: |
vcpkg integrate install
vcpkg install doctest --triplet x64-windows
bash ./getlibs.sh
- name: Build and test
run: |
cmake -DCMAKE_BUILD_TYPE=Release -DUDBM_WITH_TESTS=ON "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_PREFIX_PATH=$(pwd)/local -B build -S .
cmake --build build --config Release
cd build
ctest --output-on-failure -C Release
WINEPATH=$($PWD/winepath-for ${{ matrix.target }})
echo "WINEPATH=$WINEPATH" >> $GITHUB_ENV
echo "WINARCH=win64" >> $GITHUB_ENV
- name: Build without getlibs
run: |
BUILD="build-${{ matrix.target }}-${CMAKE_BUILD_TYPE,,}"
cmake -S . -B "$BUILD" -DUDBM_STATIC=$STATIC -DASAN=${{ matrix.sanitizers }} -DUBSAN=${{ matrix.sanitizers }} -DENABLE_DBM_NEW=${{ matrix.newdbm }}
cmake --build "$BUILD" --config $CMAKE_BUILD_TYPE
(cd "$BUILD" ; ctest -C $CMAKE_BUILD_TYPE)
- name: Getlibs
run: ./getlibs.sh ${{ matrix.target }}
- name: Build with getlibs
run: |
BUILD="build-${{ matrix.target }}-libs-${CMAKE_BUILD_TYPE,,}"
cmake -S . -B "$BUILD" -DCMAKE_PREFIX_PATH="${{ github.workspace }}/local/${{ matrix.target }}" -DUDBM_STATIC=$STATIC -DASAN=${{ matrix.sanitizers }} -DUBSAN=${{ matrix.sanitizers }} -DENABLE_DBM_NEW=${{ matrix.newdbm }}
cmake --build "$BUILD" --config $CMAKE_BUILD_TYPE
(cd "$BUILD" ; ctest -C $CMAKE_BUILD_TYPE)
build-macos:
runs-on: macos-latest
env:
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/cmake/toolchain/x86_64-darwin.cmake
CMAKE_BUILD_TYPE: Release
CTEST_OUTPUT_ON_FAILURE: 1
CTEST_TEST_TIMEOUT: 20
STATIC: ON
strategy:
fail-fast: false
matrix:
sanitizers: [ON, OFF]
steps:
- uses: actions/checkout@v2
- name: Get dependencies
run: brew install boost doctest && ./getlibs.sh
- name: Build and test
run: |
export CTEST_OUTPUT_ON_FAILURE=1
cmake -DUDBM_WITH_TESTS=ON -DASAN=${{ matrix.sanitizers }} -DUBSAN=${{ matrix.sanitizers }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(pwd)/local -B build -S .
cmake --build build
(cd build ; ctest)
build-nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build and test
run: nix build -L
build-nix-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build and test
run: nix build -L
build-nix-cross:
runs-on: ubuntu-latest
- uses: actions/checkout@v3
- name: Build without getlibs
run: |
BUILD=build-x86_64-darwin-$CMAKE_BUILD_TYPE
cmake -S . -B "$BUILD" -DASAN=${{ matrix.sanitizers }} -DUBSAN=${{ matrix.sanitizers }}
cmake --build "$BUILD" --config $CMAKE_BUILD_TYPE
(cd "$BUILD" ; ctest -C $CMAKE_BUILD_TYPE)
- name: Get dependencies
run: CMAKE_BUILD_TYPE=Release ./getlibs.sh x86_64-darwin
- name: Build with getlibs
run: |
BUILD=build-x86_64-darwin-libs-$CMAKE_BUILD_TYPE
cmake -S . -B "$BUILD" -DCMAKE_PREFIX_PATH="${{ github.workspace }}/local/x86_64-darwin" -DASAN=${{ matrix.sanitizers }} -DUBSAN=${{ matrix.sanitizers }}
cmake --build "$BUILD" --config $CMAKE_BUILD_TYPE
(cd "$BUILD" ; ctest -C $CMAKE_BUILD_TYPE)
build-windows:
runs-on: windows-latest
env:
CMAKE_TOOLCHAIN_FILE: C:/vcpkg/scripts/buildsystems/vcpkg.cmake
CMAKE_BUILD_TYPE: Release
STATIC: ON
CTEST_OUTPUT_ON_FAILURE: 1
CTEST_TEST_TIMEOUT: 20
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v15
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build and test
run: nix build -L .\#packages.crossPackage.x86_64-linux
- uses: actions/checkout@v3
- name: Build without getlibs
run: |
$env:BUILD='build-x86_64-windows'
cmake -S . -B $env:BUILD
cmake --build $env:BUILD --config $env:CMAKE_BUILD_TYPE
cd $env:BUILD
ctest -C $env:CMAKE_BUILD_TYPE
- name: Get dependencies
run: |
vcpkg integrate install
vcpkg install doctest --triplet x64-windows
pwsh -Command { $env:CMAKE_BUILD_TYPE=Release ; bash ./getlibs.sh x86_64-w64-mingw32 }
- name: Build with getlibs
run: |
$env:BUILD='build-x86_64-windows-libs'
cmake -S . -B $env:BUILD -DCMAKE_PREFIX_PATH="${{ github.workspace }}/local/x86_64-w64-mingw32"
cmake --build $env:BUILD --config $env:CMAKE_BUILD_TYPE
cd $env:BUILD
ctest -C $env:CMAKE_BUILD_TYPE
Loading