ci: move to github workflow #19
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 Build | |
on: | |
push: | |
branches: | |
- master | |
- staging | |
pull_request: | |
branches: | |
- master | |
- staging | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.10'] | |
go-version: ['1.16', '1.20'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Buildifier | |
run: | | |
sudo curl -fsSL -o /usr/bin/buildifier https://github.com/bazelbuild/buildtools/releases/download/7.1.1/buildifier-linux-amd64 | |
sudo chmod 755 /usr/bin/buildifier | |
- name: Install APT requirements | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y ninja-build | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Run tests | |
run: | | |
cmake -G Ninja -S . -B "build" | |
cmake --build "build" --target better-test | |
cmake --build "build" --target lint | |
- name: Deploy | |
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/staging' | |
run: | | |
cmake -G Ninja -S . -B "build" | |
cmake --build "build" --target push-cmakelang-github-pseudorelease-tag | |
cmake --build "build" --target push-cmakelang-github-release | |
cmake --build "build" --target push-cmakelang-rtd-repo | |
cmake --build "build" --target push-cmakelang-pypi-release | |
cmake --build "build" --target push-cmakelang-precommit | |
cmake --build "build" --target push-cmakelang-docker |