Skip to content

Sketcher Build and Test #102

Sketcher Build and Test

Sketcher Build and Test #102

name: Sketcher Build and Test
on:
workflow_dispatch: ~
push: ~
pull_request: ~
schedule:
- cron: "0 4 * * *"
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [macos-latest]
build-output: [app]
steps:
- uses: actions/checkout@v4
- name: Create and activate virtualenv
run: |
python3 -m venv .venv
source .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Install Python packages
run: python3 -m pip install ninja clang-format==14.0.6
- name: Code formatting check
run: find . -name *.h -o -name *.cpp | xargs clang-format -n --Werror
- name: Read external/versions.json
run: |
{
echo 'VERSIONS_JSON<<EOF'
cat external/versions.json
echo -e '\nEOF'
} >> "$GITHUB_ENV"
- name: Configure Dependency CMake
run: |
cmake -B build/external/ -S external/ -G Ninja \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
- name: Fetch fmt
id: fetch-fmt
uses: ./.github/actions/build-external
with:
library: fmt
version: ${{ fromJson(env.VERSIONS_JSON).fmt }}
build-output: ${{ matrix.build-output }}
- name: Fetch zlib
id: fetch-zlib
uses: ./.github/actions/build-external
with:
library: zlib
version: ${{ fromJson(env.VERSIONS_JSON).zlib }}
build-output: ${{ matrix.build-output }}
- name: Fetch zstd
id: fetch-zstd
uses: ./.github/actions/build-external
with:
library: zstd
version: ${{ fromJson(env.VERSIONS_JSON).zstd }}
build-output: ${{ matrix.build-output }}
- name: Fetch Boost
id: fetch-boost
uses: ./.github/actions/build-external
with:
library: boost
version: ${{ fromJson(env.VERSIONS_JSON).boost }}
build-output: ${{ matrix.build-output }}
- name: Fetch RDKit
id: fetch-rdkit
uses: ./.github/actions/build-external
with:
library: rdkit
version: ${{ fromJson(env.VERSIONS_JSON).rdkit }}
build-output: ${{ matrix.build-output }}
- name: Fetch Qt
id: fetch-qt
uses: ./.github/actions/build-external
with:
library: qt
version: ${{ fromJson(env.VERSIONS_JSON).qt }}
build-output: ${{ matrix.build-output }}
- name: Configure CMake
env:
CMAKE_PREFIX_PATH: "${{ steps.fetch-fmt.outputs.path }};\
${{ steps.fetch-zlib.outputs.path }};\
${{ steps.fetch-zstd.outputs.path }};\
${{ steps.fetch-boost.outputs.path }};\
${{ steps.fetch-rdkit.outputs.path }};\
${{ steps.fetch-qt.outputs.path }}"
run: |
cmake -B build -S . -G Ninja \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_PREFIX_PATH="${{ env.CMAKE_PREFIX_PATH }}"
- name: Build
run: cmake --build build --config ${{ env.BUILD_TYPE }}
- name: Test
working-directory: build
run: ctest --build-config ${{ env.BUILD_TYPE }} --output-on-failure
- name: Download sketcher executable
uses: actions/upload-artifact@v4
with:
name: sketcher_${{ matrix.build-output }}
path: build/sketcher_app