Skip to content

Use old logic for equal area projection #183

Use old logic for equal area projection

Use old logic for equal area projection #183

Workflow file for this run

name: CI
on:
push:
branches:
- old-eq-area
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: "Build (${{ matrix.name }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # Make sure if one build fails, others can still run
matrix:
include:
# Linux
- os: ubuntu-latest
compiler: clang
version: 16
build_type: Release
name: ubuntu-release-clang
# - os: ubuntu-latest
# compiler: clang
# version: 16
# build_type: Debug
# name: ubuntu-debug-clang
# macOS
- os: macos-14
compiler: apple-clang
version: ""
build_type: Release
name: macos-release-appleclang
steps:
- uses: actions/checkout@v4
- name: Setup Python & Conan
run: |
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip wheel conan==2.16.1 cmake==3.30.0
conan remote update conancenter --url=https://center2.conan.io
conan profile detect
- name: Install compiler (Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
if [[ "${{ matrix.compiler }}" == "gcc" ]]; then
sudo apt-get install -y gcc-${{ matrix.version }} g++-${{ matrix.version }}
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
else
sudo apt-get install -y clang-${{ matrix.version }} lld
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
fi
# We only perform static builds so the output can be exported as an artifact
# for testing on a clean system without installing dependencies.
- name: Download Dependencies
run: |
source .venv/bin/activate
conan install . \
--output-folder build \
--build=missing \
-s build_type=${{ matrix.build_type }} \
-s compiler.cppstd=20 \
-o "*:shared=False" \
-o "*:fPIC=False"
- name: Configure & build
run: |
source .venv/bin/activate
if [[ "${{ runner.os }}" == "Linux" ]]; then
FIND_SUFFIX='-DCMAKE_FIND_LIBRARY_SUFFIXES=.a'
EXE_FLAGS='-static -static-libstdc++ -static-libgcc -pthread'
else
FIND_SUFFIX=''
EXE_FLAGS=''
fi
cmake -S . -B build \
-DCMAKE_TOOLCHAIN_FILE=build/build/${{ matrix.build_type }}/generators/conan_toolchain.cmake \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
${FIND_SUFFIX} \
-DCMAKE_EXE_LINKER_FLAGS="${EXE_FLAGS}"
cmake --build build -j$(nproc || sysctl -n hw.ncpu)
- name: Package build folder
run: tar -czf build-${{ matrix.name }}.tar.gz build
- name: Upload artefact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: build-${{ matrix.name }}.tar.gz
# ─────────────────────────── Unit Tests ───────────────────────────
unit-tests:
name: "Unit tests (${{ matrix.target }})"
needs: [build]
strategy:
fail-fast: false
matrix:
target:
- ubuntu-release-clang
- macos-release-appleclang
runs-on: "${{ contains(matrix.target, 'mac') && 'macos-14' || 'ubuntu-latest' }}"
steps:
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.target }}
- name: Unpack build folder
run: tar -xzf build-${{ matrix.target }}.tar.gz
- name: Unit tests
run: |
ctest --test-dir build -L unit --output-on-failure
# ────────────────────────── Stress Tests ──────────────────────────
stress-tests:
name: "Stress tests (${{ matrix.target }})"
needs: [build]
strategy:
fail-fast: false
matrix:
target:
- ubuntu-release-clang
- macos-release-appleclang
runs-on: "${{ contains(matrix.target, 'mac') && 'macos-14' || 'ubuntu-latest' }}"
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.target }}
- name: Unpack build folder
run: tar -xzf build-${{ matrix.target }}.tar.gz
- name: Stress tests
run: |
ctest --test-dir build -L stress --output-on-failure