Add caching/switch to just building #26
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: Gematria CI | ||
on: [push, repository_dispatch, pull_request] | ||
jobs: | ||
check-python-formatting: | ||
name: Python Formatting Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install pyink | ||
run: pip3 install pyink==23.5.0 | ||
- name: Check python formatting | ||
run: pyink --check --diff . | ||
check-cpp-formatting: | ||
name: C++ Formatting Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Check c++ formatting | ||
uses: jidicula/[email protected] | ||
with: | ||
clang-format-version: '16' | ||
check-path: 'src' | ||
check-bazel-formatting: | ||
name: Bazel Formatting Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: thompsonja/[email protected] | ||
with: | ||
buildifier_version: v6.1.2 | ||
check-bazel: | ||
name: Run project tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Cache Bazel | ||
uses: actions/cache@v3 | ||
with: | ||
Check failure on line 44 in .github/workflows/main.yml GitHub Actions / Gematria CIInvalid workflow file
|
||
path: | | ||
~/.cache/bazel | ||
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel') }} | ||
restore-keys: | | ||
${{ runner.os }}-bazel- | ||
- name: Run build | ||
run: bazel build ... |