Have one build on all push and all builds on main and release and PRs #261
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: Build/Test | |
on: [push] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
compiler: [clang++-17] | |
python-version: ["3.12"] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Build | |
uses: ./.github/actions/build | |
env: | |
BUILD_OS: ${{ matrix.os }} | |
CXX: ${{ matrix.compiler }} | |
- name: Publish release distributions to PyPI | |
if: github.event.release | |
uses: pypa/gh-action-pypi-publish@release/v1 |