Support converting .cool to .hic files #168
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) 2023 Roberto Rossini (roberros@uio.no) | |
# SPDX-License-Identifier: MIT | |
name: Windows CI | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- ".github/workflows/windows-ci.yml" | |
- "cmake/**" | |
- "examples/**" | |
- "src/**" | |
- "test/**" | |
- "CMakeLists.txt" | |
- "conanfile.txt" | |
tags: | |
- 'v*.*.*' | |
pull_request: | |
paths: | |
- ".github/workflows/windows-ci.yml" | |
- "cmake/**" | |
- "examples/**" | |
- "src/**" | |
- "test/**" | |
- "CMakeLists.txt" | |
- "conanfile.txt" | |
# https://stackoverflow.com/a/72408109 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
CONAN_HOME: "${{ github.workspace }}/.conan2" | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-project: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { compiler-name: msvc, os: 'windows-2022', conan-ver: '2.0.*', cmake-ver: '3.26.*', build_type: Debug, developer_mode: OFF } | |
- { compiler-name: msvc, os: 'windows-2022', conan-ver: '2.0.*', cmake-ver: '3.26.*', build_type: Release, developer_mode: OFF } | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Generate requirements.txt for pip | |
run: | | |
echo 'conan==${{ matrix.conan-ver }}' > requirements.txt | |
echo 'cmake==${{ matrix.cmake-ver }}' >> requirements.txt | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Detect number available CPUs | |
run: | | |
ncpus=$(python -c 'import multiprocessing as mp; print(mp.cpu_count())') | |
echo "CMAKE_BUILD_PARALLEL_LEVEL=$ncpus" >> $GITHUB_ENV | |
echo "CTEST_PARALLEL_LEVEL=$ncpus" >> $GITHUB_ENV | |
- name: Install deps with PIP | |
run: | | |
pip install -r requirements.txt | |
- name: Generate cache key | |
id: cache-key | |
run: | | |
set -u | |
os="${{ matrix.os }}" | |
compiler="${{ matrix.compiler-name }}" | |
build_type="${{ matrix.build_type }}" | |
hash="${{ hashFiles('conanfile.txt', '.github/workflows/windows-ci.yml') }}" | |
echo "key=$os-$compiler-$hash-$build_type" >> $GITHUB_OUTPUT | |
- name: Restore Conan cache | |
id: cache-conan | |
uses: actions/cache/restore@v3 | |
with: | |
key: conan-${{ steps.cache-key.outputs.key }} | |
path: ${{ env.CONAN_HOME }} | |
- name: Configure Conan | |
if: steps.cache-conan.outputs.cache-hit != 'true' | |
run: | | |
conan profile detect --force | |
- name: Clean Conan cache (pre-build) | |
if: steps.cache-conan.outputs.cache-hit != 'true' | |
run: | | |
conan cache clean "*" --build | |
conan cache clean "*" --download | |
conan cache clean "*" --source | |
conan remove --confirm "*" | |
- name: Install build dependencies | |
run: | | |
conan install . \ | |
--build=missing \ | |
-pr:h default \ | |
-pr:b default \ | |
-s "compiler=${{ matrix.compiler-name }}" \ | |
-s "build_type=${{ matrix.build_type }}" \ | |
-s "compiler.runtime_type=${{ matrix.build_type }}" \ | |
-s compiler.cppstd=17 \ | |
--output-folder=build | |
- name: Clean Conan cache (post-build) | |
if: steps.cache-conan.outputs.cache-hit != 'true' | |
run: | | |
conan cache clean "*" --build | |
conan cache clean "*" --download | |
conan cache clean "*" --source | |
- name: Save Conan cache | |
uses: actions/cache/save@v3 | |
if: steps.cache-conan.outputs.cache-hit != 'true' | |
with: | |
key: conan-${{ steps.cache-key.outputs.key }} | |
path: ${{ env.CONAN_HOME }} | |
- name: Configure project | |
run: | | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/build" \ | |
-DENABLE_DEVELOPER_MODE=${{ matrix.developer_mode }} \ | |
-DHICTK_ENABLE_TESTING=ON \ | |
-DHICTK_BUILD_EXAMPLES=ON \ | |
-DOPT_ENABLE_CLANG_TIDY=OFF \ | |
-DOPT_ENABLE_CPPCHECK=OFF \ | |
-S . \ | |
-B build | |
- name: Build project | |
run: cmake --build build --config ${{ matrix.build_type }} | |
- name: Run unit tests | |
run: | | |
ctest --test-dir build \ | |
--schedule-random \ | |
--output-on-failure \ | |
--no-tests=error \ | |
--timeout 180 \ | |
--exclude-regex 'Cooler: dataset large read\/write.*' |& | |
tail -n 1000 | |
windows-ci-status-check: | |
name: Status Check (Windows CI) | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
needs: | |
- build-project | |
steps: | |
- name: Collect job results | |
if: needs.build-project.result != 'success' | |
run: exit 1 |