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 for Windows and Mac OS #257

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1efddc1
Fix Windows compilation cannot resolve std::max template
SSoelvsten Jun 3, 2022
3ec4dff
Remove deprecated use of 'std::random_shuffle'
SSoelvsten Jun 3, 2022
a185e8a
Remove use of deprecated 'std::binary_function'
SSoelvsten Jun 3, 2022
4371787
Add missing import of Boost.System
SSoelvsten Jun 3, 2022
77a1976
Add catch of std::system_error
SSoelvsten Jun 3, 2022
0cb7ec4
Change Windows CI Boost installation to MarkusJx/install-boost
SSoelvsten Jun 4, 2022
1c69aef
Fix incorrect call for running CTest on Windows
SSoelvsten Jun 4, 2022
4547b57
Fix README.md claims to support C++14 rather than C++17
SSoelvsten Jun 4, 2022
4453f60
Split 'Build + Test' CI into different jobs per OS
SSoelvsten Jun 4, 2022
9db0917
Make Doxygen CI job name match test CI
SSoelvsten Jun 4, 2022
17f4fe7
Update compiler versions for Linux and Mac CI
SSoelvsten Mar 9, 2023
1beaa9f
Update to newest version of MSVC setup action
SSoelvsten Mar 13, 2023
fa28f32
Update Mac and Linux to the C++17 standard
SSoelvsten Mar 14, 2023
4f95747
Cleanup of Windows CI
SSoelvsten Mar 15, 2023
fbdc3b7
Fix running tests are mistakenly skipped if changes are in subfolders
SSoelvsten Mar 21, 2023
30dc521
Ensure job completes with a checkmark even if skipped
SSoelvsten Mar 21, 2023
8fa5e9e
Remove trailing whitespace in tpie::packed_array
SSoelvsten Sep 22, 2023
7b9c101
Clean up tpie::packed_array to decrease mental complexity
SSoelvsten Sep 22, 2023
e8e0f07
Add explanatory comment for typedef
SSoelvsten Sep 22, 2023
c028540
Fix tpie::packed_array cannot compile with MSVC 19.28+
SSoelvsten Sep 22, 2023
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
63 changes: 0 additions & 63 deletions .github/workflows/build_windows.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
skip_duplicate:
name: 'Check whether to skip job'
name: 'Skip job?'
continue-on-error: true
runs-on: ubuntu-latest

Expand Down
147 changes: 147 additions & 0 deletions .github/workflows/test_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: test (Linux)

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
check_skip:
name: 'Skip job? (Linux)'
continue-on-error: true
runs-on: ubuntu-latest

steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
paths: '["tpie/**", "test/**"]'

outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}

build_and_test:
name: 'Build + Test (Linux, ${{matrix.cc.cc}}-${{matrix.cc.v}}, ${{matrix.build_type}})'
runs-on: ${{ matrix.os }}

needs: check_skip
if: ${{ needs.check_skip.outputs.should_skip != 'true' }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
build_type: [Release, Debug]
cc:
# GNU Compiler
- { cc: gcc, v: 10, cxx: g++ } # oldest possible
- { cc: gcc, v: 11, cxx: g++ } # default
- { cc: gcc, v: 12, cxx: g++ } # newest

# Clang Compiler
- { cc: clang, v: 11, cxx: clang++ } # oldest possible
- { cc: clang, v: 14, cxx: clang++ } # default
- { cc: clang, v: 15, cxx: clang++ } # newst possible

env:
cc: ${{matrix.cc.cc}}-${{matrix.cc.v}}
cxx: ${{matrix.cc.cxx}}-${{matrix.cc.v}}
macro_flags: '-DLZ4_compress_default\(a,b,c,d\)=LZ4_compress\(a,b,c\)'

steps:
# Git repo set up
- name: Checkout commit
uses: actions/checkout@v2

# Installation Linux
- name: Install dependencies
run: |
sudo apt update

echo "================================"
echo "Compiler"
sudo apt install build-essential
sudo apt install ${{matrix.cc.cc}}-${{matrix.cc.v}}

echo "================================"
echo "Boost"
sudo apt install libboost-all-dev

echo "================================"
echo "Snappy"
sudo apt install libsnappy-dev

echo "================================"
echo "LZ4"
sudo apt install liblz4-dev

echo "================================"
echo "ZSTD"
export CC=${{env.cc}}
export CCX=${{env.cxx}}
export MACRO_FLAGS="${{env.macro_flags}}"

git clone https://github.com/facebook/zstd
cd zstd
git checkout tags/v1.3.1
sudo make install

# CMake build and run
- name: CMake build
working-directory: ${{runner.workspace}}
run: |
export CC=${{env.cc}}
if [ "${{ matrix.cc.cc }}" != "gcc" ] ;
then
export CXX=${{env.cxx}}
fi
export MACRO_FLAGS="${{env.macro_flags}}"

cmake -E make_directory ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake -D CMAKE_BUILD_TYPE="${{matrix.build_type}}" -D CMAKE_CXX_STANDARD=17 -D CMAKE_C_FLAGS="$MACRO_FLAGS" -D CMAKE_CXX_FLAGS="$MACRO_FLAGS" ..

make -j2

- name: CTest run
working-directory: ${{github.workspace}}/build
run: ctest --timeout 30

# Check if tests are missing
- name: Check missing CTests
working-directory: ${{github.workspace}}
run: |
sudo apt install python3 python3-pip
pip install cmakeast
python3 scripts/check_missing_ctests.py

skip:
name: 'Build + Test (Linux, ${{matrix.cc.cc}}-${{matrix.cc.v}}, ${{matrix.build_type}})'
runs-on: ubuntu-latest

needs: check_skip
if: ${{ needs.check_skip.outputs.should_skip == 'true' }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
build_type: [Release, Debug]
cc:
# GNU Compiler
- { cc: gcc, v: 10, cxx: g++ } # oldest possible
- { cc: gcc, v: 11, cxx: g++ } # default
- { cc: gcc, v: 12, cxx: g++ } # newest

# Clang Compiler
- { cc: clang, v: 11, cxx: clang++ } # oldest possible
- { cc: clang, v: 14, cxx: clang++ } # default
- { cc: clang, v: 15, cxx: clang++ } # newst possible

steps:
- name: Echo skip
run: |
echo "Running unit tests is skipped"
146 changes: 146 additions & 0 deletions .github/workflows/test_mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
name: test (Mac OS)

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
check_skip:
name: 'Skip job? (Mac OS)'
continue-on-error: true
runs-on: ubuntu-latest

steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
paths: '["tpie/**", "test/**"]'

outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}

build_and_test:
name: 'Build + Test (Mac OS, ${{matrix.cc.cc}}@${{matrix.cc.v || matrix.cc.xcode}}, ${{matrix.build_type}})'
runs-on: ${{ matrix.os }}

needs: check_skip
if: ${{ needs.check_skip.outputs.should_skip != 'true' }}

strategy:
fail-fast: false
matrix:
os: [macos-latest]
build_type: [Release, Debug]
cc:
# GNU Compiler
- { cc: gcc, v: 7, cxx: g++, xcode: latest }
- { cc: gcc, v: 10, cxx: g++, xcode: latest }
- { cc: gcc, v: 12, cxx: g++, xcode: latest }

# Clang Compiler
- { cc: clang, cxx: clang++, xcode: 13.1 } # oldest
- { cc: clang, cxx: clang++, xcode: 13.4 }
- { cc: clang, cxx: clang++, xcode: 14.0 }
- { cc: clang, cxx: clang++, xcode: 14.2 } # newest

steps:
# Git repo set up
- name: Checkout commit
uses: actions/checkout@v2

# Install dependencies
- name: Install xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{matrix.cc.xcode}}

- name: Install dependencies
run: |
brew update

if ["${{matrix.cc.cc}}" == "gcc"];
then
echo "================================"
echo "Compiler"
brew install ${{matrix.cc.cc}}@${{matrix.cc.v}}
fi

echo "================================"
echo "Boost"
brew install boost

echo "================================"
echo "Snappy"
brew install snappy

echo "================================"
echo "LZ4"
brew install lz4

echo "================================"
echo "ZSTD"
brew install zstd

# CMake build and run
- name: CMake build
working-directory: ${{runner.workspace}}
run: |
if [ "${{ matrix.cc.cc }}" == "gcc" ] ;
then
export CC=/usr/bin/${{matrix.cc.cc}}
export CXX=/usr/bin/${{matrix.cc.cxx}}
else
export CC=${{matrix.cc.cc}}
export CXX=${{matrix.cc.cxx}}
fi

cmake -E make_directory ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake -D CMAKE_BUILD_TYPE="${{matrix.build_type}}" -D CMAKE_CXX_STANDARD=17 ..

make -j2

- name: CTest run
working-directory: ${{github.workspace}}/build
run: ctest --timeout 30

# Check if tests are missing
- name: Check missing CTests
working-directory: ${{github.workspace}}
run: |
brew install python3
pip3 install cmakeast
python3 scripts/check_missing_ctests.py

skip:
name: 'Build + Test (Mac OS, ${{matrix.cc.cc}}@${{matrix.cc.v || matrix.cc.xcode}}, ${{matrix.build_type}})'
runs-on: ubuntu-latest

needs: check_skip
if: ${{ needs.check_skip.outputs.should_skip == 'true' }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
build_type: [Release, Debug]
cc:
# GNU Compiler
- { cc: gcc, v: 10, cxx: g++ } # oldest possible
- { cc: gcc, v: 11, cxx: g++ } # default
- { cc: gcc, v: 12, cxx: g++ } # newest

# Clang Compiler
- { cc: clang, v: 11, cxx: clang++ } # oldest possible
- { cc: clang, v: 14, cxx: clang++ } # default
- { cc: clang, v: 15, cxx: clang++ } # newst possible

steps:
- name: Echo skip
run: |
echo "Running unit tests is skipped"

Loading