fix workflows #72
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: CI | |
on: | |
push: | |
branches: [main] | |
tags: ['**'] | |
paths-ignore: | |
- '**/*.md' | |
pull_request: {branches: [main]} | |
defaults: {run: {shell: 'bash -el {0}'}} # https://github.com/marketplace/actions/setup-miniconda#important | |
env: | |
YARDL_VERSION: 0.6.2 | |
jobs: | |
validate: | |
strategy: | |
matrix: | |
cppVersion: [17] | |
environment: pypi | |
permissions: {id-token: write} | |
name: Validate Python and C++${{ matrix.cppVersion }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: {submodules: recursive} | |
- name: Configure environment | |
uses: ./.github/actions/configure-environment | |
- name: Install yardl | |
run: | | |
gh release download -R microsoft/yardl -p '*linux_x86_64.tar.gz' v$YARDL_VERSION | |
mkdir yardl | |
tar -xzf "yardl_${YARDL_VERSION}_linux_x86_64.tar.gz" -C yardl | |
rm "yardl_${YARDL_VERSION}_linux_x86_64.tar.gz" | |
echo "$PWD/yardl" >> "$GITHUB_PATH" | |
- name: Build model | |
run: | | |
cd model | |
yardl generate | |
- name: Python | |
run: | | |
cd python | |
python petsird_generator.py | python petsird_analysis.py | |
- name: cpp | |
run: | | |
mkdir ccp/build | |
cd cpp/build | |
cmake -G Ninja -S .. -DHDF5_ROOT="$CONDA_PREFIX" | |
ninja | |
./petsird_generator test.h5 | |
./petsird_analysis test.h5 | |
- uses: casperdcl/deploy-pypi@v2 | |
with: | |
build: -s python -o dist | |
upload: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }} | |
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
uses: casperdcl/deploy-pypi@v2 | |
with: | |
url: https://test.pypi.org/legacy/ | |
password: ${{ secrets.TEST_PYPI_TOKEN }} |