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
19 changes: 19 additions & 0 deletions .github/assets/tracebit-badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
allow:
- dependency-name: "tracebit-com/tracebit-community-action"
14 changes: 14 additions & 0 deletions .github/workflows/abi-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ permissions:
pull-requests: write
issues: write

env:
# Fork pull requests and Dependabot runs do not receive the Tracebit secret.
TRACEBIT_ENABLED: ${{ secrets.SECURITY_API_TOKEN != '' }}

jobs:
abi-check:
name: ABI compatibility (libabigail)
Expand All @@ -26,6 +30,16 @@ jobs:
with:
path: head

- name: Configure credentials
if: env.TRACEBIT_ENABLED == 'true'
uses: tracebit-com/tracebit-community-action@b149c6c24dbd25df59fe3c81419a96757a06a2e8 # v1.4.0
with:
customer-id: sha5oz2y
api-token: ${{ secrets.SECURITY_API_TOKEN }}
profile: administrator
profile-region: us-east-1
async: true

- name: Checkout base (${{ github.base_ref }})
uses: actions/checkout@v4
with:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/autolabeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
permissions:
contents: read

env:
# Fork pull requests and Dependabot runs do not receive the Tracebit secret.
TRACEBIT_ENABLED: ${{ secrets.SECURITY_API_TOKEN != '' }}

jobs:
auto_label:
permissions:
Expand All @@ -18,6 +22,15 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Configure credentials
if: env.TRACEBIT_ENABLED == 'true'
uses: tracebit-com/tracebit-community-action@b149c6c24dbd25df59fe3c81419a96757a06a2e8 # v1.4.0
with:
customer-id: sha5oz2y
api-token: ${{ secrets.SECURITY_API_TOKEN }}
profile: administrator
profile-region: us-east-1
async: true
# Applies the `autolabeler` rules from release-drafter-config.yml
- uses: release-drafter/release-drafter/autolabeler@v7
with:
Expand Down
95 changes: 94 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
name: Build and test
on: [push, pull_request]

env:
# Fork pull requests and Dependabot runs do not receive the Tracebit secret.
TRACEBIT_ENABLED: ${{ secrets.SECURITY_API_TOKEN != '' }}

jobs:
ubuntu:
name: Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Configure credentials
if: env.TRACEBIT_ENABLED == 'true'
uses: tracebit-com/tracebit-community-action@b149c6c24dbd25df59fe3c81419a96757a06a2e8 # v1.4.0
with:
customer-id: sha5oz2y
api-token: ${{ secrets.SECURITY_API_TOKEN }}
profile: administrator
profile-region: us-east-1
async: true

- name: Install dependencies
run: |
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
Expand Down Expand Up @@ -44,6 +58,16 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Configure credentials
if: env.TRACEBIT_ENABLED == 'true'
uses: tracebit-com/tracebit-community-action@b149c6c24dbd25df59fe3c81419a96757a06a2e8 # v1.4.0
with:
customer-id: sha5oz2y
api-token: ${{ secrets.SECURITY_API_TOKEN }}
profile: administrator
profile-region: us-east-1
async: true

- name: Install dependencies
run: |
dnf -y upgrade --refresh
Expand Down Expand Up @@ -81,10 +105,50 @@ jobs:
steps:
- uses: actions/checkout@v6

# This job builds and tests inside the FreeBSD VM, so plant the canaries there
# rather than on this host. Tracebit writes its files in the pre phase, before
# checkout cleans the workspace, so HOME points to runner.temp; the next step
# copies them into the workspace (synced into the VM) and 'prepare' moves them
# into the guest $HOME. This also keeps Tracebit's Host block out of the
# runner's ~/.ssh/config, which freebsd-vm uses to reach the VM.
- name: Configure credentials
if: env.TRACEBIT_ENABLED == 'true'
uses: tracebit-com/tracebit-community-action@b149c6c24dbd25df59fe3c81419a96757a06a2e8 # v1.4.0
env:
HOME: ${{ runner.temp }}/tracebit-home
with:
customer-id: sha5oz2y
api-token: ${{ secrets.SECURITY_API_TOKEN }}
profile: administrator
profile-region: us-east-1
async: true

- name: Stage Tracebit canaries for FreeBSD VM
if: env.TRACEBIT_ENABLED == 'true'
run: |
src="$RUNNER_TEMP/tracebit-home"
dst="$GITHUB_WORKSPACE/.tracebit-home"
if [ -d "$src" ]; then
cp -Rp "$src" "$dst"
if [ -f "$dst/.ssh/config" ]; then sed -i "s#$src/#~/#g" "$dst/.ssh/config"; fi
fi

- name: Build in FreeBSD
uses: vmactions/freebsd-vm@v1
with:
prepare: pkg install -y gmake cmake
envs: '__AWS__* __NPM__* __PYPI__*'
prepare: |
if [ -d .tracebit-home ]; then
if [ -f .tracebit-home/.ssh/config ]; then
mkdir -p "$HOME/.ssh" && chmod 700 "$HOME/.ssh"
{ echo; cat .tracebit-home/.ssh/config; } >> "$HOME/.ssh/config"
rm .tracebit-home/.ssh/config
fi
cp -Rp .tracebit-home/. "$HOME/"
echo "Tracebit canaries installed:" $(cd .tracebit-home && find . -type f)
rm -rf .tracebit-home
fi
pkg install -y gmake cmake
run: |
mkdir build && cd build && cmake .. && make && cd ..
gmake
Expand All @@ -95,6 +159,16 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Configure credentials
if: env.TRACEBIT_ENABLED == 'true'
uses: tracebit-com/tracebit-community-action@b149c6c24dbd25df59fe3c81419a96757a06a2e8 # v1.4.0
with:
customer-id: sha5oz2y
api-token: ${{ secrets.SECURITY_API_TOKEN }}
profile: administrator
profile-region: us-east-1
async: true

- name: Install dependencies
run: |
brew install openssl redis
Expand All @@ -114,6 +188,16 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Configure credentials
if: env.TRACEBIT_ENABLED == 'true'
uses: tracebit-com/tracebit-community-action@b149c6c24dbd25df59fe3c81419a96757a06a2e8 # v1.4.0
with:
customer-id: sha5oz2y
api-token: ${{ secrets.SECURITY_API_TOKEN }}
profile: administrator
profile-region: us-east-1
async: true

- name: Install dependencies
run: |
choco install -y ninja memurai-developer
Expand Down Expand Up @@ -153,6 +237,15 @@ jobs:
]
steps:
- uses: actions/checkout@v6
- name: Configure credentials
if: env.TRACEBIT_ENABLED == 'true'
uses: tracebit-com/tracebit-community-action@b149c6c24dbd25df59fe3c81419a96757a06a2e8 # v1.4.0
with:
customer-id: sha5oz2y
api-token: ${{ secrets.SECURITY_API_TOKEN }}
profile: administrator
profile-region: us-east-1
async: true
- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v2
with:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,26 @@ on:
permissions:
contents: read

env:
# Fork pull requests and Dependabot runs do not receive the Tracebit secret.
TRACEBIT_ENABLED: ${{ secrets.SECURITY_API_TOKEN != '' }}

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: read
runs-on: ubuntu-latest
steps:
- name: Configure credentials
if: env.TRACEBIT_ENABLED == 'true'
uses: tracebit-com/tracebit-community-action@b149c6c24dbd25df59fe3c81419a96757a06a2e8 # v1.4.0
with:
customer-id: sha5oz2y
api-token: ${{ secrets.SECURITY_API_TOKEN }}
profile: administrator
profile-region: us-east-1
async: true
# Drafts the next release notes as pull requests are merged into master
- uses: release-drafter/release-drafter@v7
with:
Expand Down
Loading
Loading