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

Fix CI (boost not avaible on github actions) #278

Merged
merged 4 commits into from
Feb 26, 2021
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
30 changes: 22 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
name: Linux
runs-on: ubuntu-latest
steps:
- name: Install Boost
run: sudo apt install -y libboost-all-dev

- name: Checkout sources
uses: actions/checkout@v1

Expand All @@ -19,7 +22,6 @@ jobs:
cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build-linux
-DCMAKE_BUILD_TYPE=Release
-DBUILD_EXAMPLES=ON
-DCMAKE_PREFIX_PATH=$BOOST_ROOT_1_72_0

- name: Build
run: cmake --build $GITHUB_WORKSPACE/build-linux --parallel 3
Expand All @@ -33,7 +35,7 @@ jobs:
name: MacOS
runs-on: macos-latest
steps:
- name: Pre-requisites
- name: Install Boost
run: brew install boost

- name: Checkout sources
Expand All @@ -51,21 +53,32 @@ jobs:
CTEST_OUTPUT_ON_FAILURE: 1

windows:
env:
BOOST_ROOT: C:\thirdparties\boost-1.72.0
BOOST_URL: https://sourceforge.net/projects/boost/files/boost-binaries/1.72.0/boost_1_72_0-msvc-14.2-64.exe/download
LIBXML2_ROOT: C:\thirdparties\libxml2-2.9.10
LIBXML2_URL: https://github.com/GNOME/libxml2/archive/v2.9.10.zip
name: Windows
runs-on: windows-latest
steps:
- name: Pre-requisites
- name: Install LibXml2
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
choco install wget --no-progress
wget -nv https://github.com/GNOME/libxml2/archive/v2.9.10.zip
wget -nv %LIBXML2_URL%
7z x v2.9.10.zip
cd libxml2-2.9.10/win32
cscript configure.js compiler=msvc prefix=C:\thirdparties\libxml2-2.9.10 iconv=no
cscript configure.js compiler=msvc prefix=%LIBXML2_ROOT% iconv=no
nmake -f Makefile.msvc
nmake -f Makefile.msvc install

- name: Install Boost
shell: cmd
run: |
wget -nv -O boost-installer.exe %BOOST_URL%
boost-installer.exe /dir=%BOOST_ROOT% /sp- /verysilent /suppressmsgboxes /norestart

- name: Checkout sources
uses: actions/checkout@v1

Expand All @@ -74,7 +87,6 @@ jobs:
run: >
cmake -S %GITHUB_WORKSPACE% -B %GITHUB_WORKSPACE%\build-windows
-DBUILD_EXAMPLES=ON
-DCMAKE_PREFIX_PATH=%BOOST_ROOT_1_72_0%;C:\thirdparties\libxml2-2.9.10

- name: Build
shell: cmd
Expand All @@ -85,7 +97,7 @@ jobs:
- name: Tests
shell: cmd
run: |
set PATH=%PATH%;C:\thirdparties\libxml2-2.9.10\bin;%BOOST_ROOT_1_72_0%\lib;%GITHUB_WORKSPACE%\build-windows\src\Release;%GITHUB_WORKSPACE%\build-windows\src\test\Release
set PATH=%PATH%;%LIBXML2_ROOT%\bin;%BOOST_ROOT%\lib64-msvc-14.2;%GITHUB_WORKSPACE%\build-windows\src\Release;%GITHUB_WORKSPACE%\build-windows\src\test\Release
cmake --build %GITHUB_WORKSPACE%\build-windows --target RUN_TESTS --config Release --verbose
env:
CTEST_OUTPUT_ON_FAILURE: 1
Expand Down Expand Up @@ -118,6 +130,9 @@ jobs:
env:
SONAR_SCANNER_VERSION: 3.3.0.1492

- name: Install Boost
run: sudo apt install -y libboost-all-dev

- name: Checkout sources
uses: actions/checkout@v1

Expand All @@ -127,7 +142,6 @@ jobs:
-DCMAKE_BUILD_TYPE=Debug
-DCODE_COVERAGE=TRUE
-DBUILD_EXAMPLES=ON
-DCMAKE_PREFIX_PATH=$BOOST_ROOT_1_72_0

- name: Build
run: >
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ jobs:
name: clang-tidy
runs-on: ubuntu-latest
steps:
- name: Install Boost
run: sudo apt install -y libboost-all-dev

- name: Install clang-tidy
run: |
sudo apt-get install -y clang-tidy-9
sudo apt install -y clang-tidy-9
Comment on lines +13 to +17
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least last I checked, apt-get (and apt-cache) was (were) recommended for CI because apt didn't have a committed non-interactive mode, and it will spit out a warning when run in such conditions.

sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-9 100

- name: Checkout sources
Expand Down