Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
name: clang-format-and-lint
name: ci-format-test-lint

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
paths:
[
"**.c",
"**.cpp",
"**.h",
"**.hpp",
"**.cxx",
"**.hxx",
"**.cc",
"**.hh",
"**CMakeLists.txt",
"meson.build",
"**.cmake",
]

jobs:
clang-format-and-lint:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true

- name: Build
run: bazel build //...

- name: Test
run: bazel test //test/...

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: bazel-contrib/setup-bazel@0.18.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true

- name: Build compilation database
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Lint PR Title'

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions: # added using https://github.com/step-security/secure-workflows
contents: read

jobs:
main:
permissions:
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@ac7e3fc035c47465748bbcb1a822c1583cf79bbc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
push:
branches: ["main"]

permissions:
contents: read

jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write

# Release-please creates a PR that tracks all changes
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.RELEASE_PLEASE_ACTION_TOKEN }}

# TODO: publishing goes here
# publish:
# environment: publish
# runs-on: ubuntu-latest
# permissions:
# contents: read
# needs: release-please
# if: ${{ fromJSON(needs.release-please.outputs.release_created || false) }}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ git submodule update --init --recursive

and run tests with,
```

bazel test //test/...
Comment thread
oxddr marked this conversation as resolved.
```

### Opening a Pull Request
Expand Down
2 changes: 2 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file intentionally left empty.
# This project uses Bzlmod (MODULE.bazel) for dependency management.
Comment thread
oxddr marked this conversation as resolved.