v0.5.0 #94
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
name: osx | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
- cron: "0 5 * * 1" # runs at 05:00 UTC on Mondays | |
jobs: | |
build: | |
name: ${{ matrix.config }} build on ${{ matrix.os }} (Python ${{ matrix.python-version }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
max-parallel: 4 | |
matrix: | |
os: ["macos-13"] | |
python-version: [3.9] | |
config: ["Release"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Timestamp # Idea from https://tinyurl.com/47wz7vpv | |
id: timestamp | |
shell: cmake -P {0} | |
run: | | |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) | |
message("::set-output name=now::${current_date}") | |
- name: Configuring Cache | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
/Users/runner/Library/Caches/ccache | |
/Users/runner/conda_pkgs_dir | |
key: | |
${{ runner.os }}-${{ matrix.config }}-${{ runner.python-version }}-${{ github.ref }}-ccache-${ { steps.timestamp.outputs.now } } | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.config }}-${{ runner.python-version }}-${{ github.ref }}-ccache- | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge | |
channel-priority: true | |
- name: Configuring Conda Environment | |
shell: bash -l {0} | |
env: | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
run: | | |
conda config --set always_yes yes --set changeps1 no | |
conda config --add channels conda-forge | |
conda install conda-devenv | |
conda devenv | |
- name: Building, Testing & Installing ThermoFun | |
shell: bash -l {0} | |
run: | | |
source activate thermofun | |
ccache -s | |
ccache -z | |
mkdir .build && cd .build | |
cmake -GNinja .. -DCMAKE_BUILD_TYPE=${{ matrix.config }} | |
ninja | |
ninja install | |
python -c "import thermofun" | |
ccache -s |