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
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Every text file is stored and checked out with LF, on every platform. Without
# this, Git for Windows checks out CRLF, gofmt rewrites every file back to LF,
# and the format gate reports the whole module as unformatted. It also keeps the
# frames under tests/e2e/screens comparable, which are diffed byte for byte.
* text=auto eol=lf

# Never converted: the inference library this program carries, and the images.
*.so binary
*.dylib binary
*.dll binary
*.gguf binary
*.png binary
7 changes: 7 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: opendba

paths-ignore:
- src/cli/internal/parser/generated

queries:
- uses: security-and-quality
62 changes: 17 additions & 45 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false

- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
with:
go-version-file: go.work
cache: false
Expand All @@ -39,7 +39,7 @@ jobs:
echo "modules=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"

- name: Reuse what was compiled before
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: |
${{ steps.caches.outputs.build }}
Expand All @@ -50,7 +50,7 @@ jobs:
go-${{ runner.os }}-

- name: Cache the pinned tools
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: .local/bin
key: tools-ubuntu-latest-${{ hashFiles('src/tools/go.sum', 'src/tools/internal/toolbin/toolbin.go') }}
Expand All @@ -60,7 +60,7 @@ jobs:

- name: Upload the coverage report
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: coverage
path: coverage.html
Expand All @@ -76,11 +76,11 @@ jobs:
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false

- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
with:
go-version-file: go.work
cache: false
Expand All @@ -93,7 +93,7 @@ jobs:
echo "modules=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"

- name: Reuse what was compiled before
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: |
${{ steps.caches.outputs.build }}
Expand All @@ -113,11 +113,11 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false

- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
with:
go-version-file: go.work
cache: false
Expand All @@ -130,7 +130,7 @@ jobs:
echo "modules=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"

- name: Reuse what was compiled before
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: |
${{ steps.caches.outputs.build }}
Expand All @@ -145,7 +145,7 @@ jobs:

- name: Upload what the screens looked like
if: always()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: screens
path: .e2e
Expand All @@ -167,11 +167,11 @@ jobs:
- { goos: windows, goarch: amd64 }
- { goos: windows, goarch: arm64 }
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false

- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
with:
go-version-file: go.work
cache: false
Expand All @@ -184,7 +184,7 @@ jobs:
echo "modules=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"

- name: Reuse what was compiled before
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: |
${{ steps.caches.outputs.build }}
Expand All @@ -207,39 +207,11 @@ jobs:
contents: read
security-events: write
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false

- uses: zizmorcore/zizmor-action@v0.6.2
- uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054
with:
version: v1.29.0
config: .github/zizmor.yml

pages:
name: publish coverage
needs: gates
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/download-artifact@v8
with:
name: coverage
path: site

- name: Use the report as the site index
run: cp site/coverage.html site/index.html

- uses: actions/configure-pages@v6
- uses: actions/upload-pages-artifact@v5
with:
path: site
- id: deployment
uses: actions/deploy-pages@v5
10 changes: 5 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@ jobs:
actions: read
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false

- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
with:
go-version-file: go.work

- uses: github/codeql-action/init@v4
- uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938
with:
languages: go
queries: security-and-quality
config-file: .github/codeql/codeql-config.yml

- name: Build both modules
run: |
go build ./src/cli/...
go build ./src/tools/...

- uses: github/codeql-action/analyze@v4
- uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938
with:
category: /language:go
47 changes: 29 additions & 18 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false

- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
with:
go-version-file: go.work
cache: false
Expand All @@ -72,7 +72,7 @@ jobs:
echo "modules=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"

- name: Reuse what was compiled before
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: |
${{ steps.caches.outputs.build }}
Expand All @@ -83,7 +83,7 @@ jobs:
go-${{ runner.os }}-

- name: Cache the pinned tools
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: .local/bin
key: tools-${{ matrix.os }}-${{ hashFiles('src/tools/go.sum', 'src/tools/internal/toolbin/toolbin.go') }}
Expand All @@ -104,11 +104,11 @@ jobs:
matrix:
os: [ubuntu-24.04-arm, macos-15-intel, windows-11-arm]
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false

- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
with:
go-version-file: go.work
cache: false
Expand All @@ -121,7 +121,7 @@ jobs:
echo "modules=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"

- name: Reuse what was compiled before
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: |
${{ steps.caches.outputs.build }}
Expand All @@ -132,7 +132,7 @@ jobs:
go-${{ runner.os }}-

- name: Cache the pinned tools
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: .local/bin
key: tools-${{ matrix.os }}-${{ hashFiles('src/tools/go.sum', 'src/tools/internal/toolbin/toolbin.go') }}
Expand All @@ -155,11 +155,11 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false

- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
with:
go-version-file: go.work
cache: false
Expand All @@ -172,7 +172,7 @@ jobs:
echo "modules=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"

- name: Reuse what was compiled before
uses: actions/cache@v6
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: |
${{ steps.caches.outputs.build }}
Expand All @@ -196,18 +196,27 @@ jobs:
id-token: write
attestations: write
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
with:
go-version-file: go.work
cache: false

- name: Make room for six binaries that each carry an inference library
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo rm -rf /usr/local/share/boost "$AGENT_TOOLSDIRECTORY"
df -h /

- name: Install cosign, which goreleaser signs with
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6

- name: Install the SBOM generator goreleaser expects
uses: anchore/sbom-action/download-syft@v0
uses: anchore/sbom-action/download-syft@e22c389904149dbc22b58101806040fa8d37a610
with:
syft-version: v1.51.0

Expand All @@ -218,16 +227,16 @@ jobs:
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "nightly $version" >> "$GITHUB_STEP_SUMMARY"

- uses: goreleaser/goreleaser-action@v7
- uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94
with:
distribution: goreleaser
version: v2.18.0
args: release --snapshot --clean
args: release --snapshot --clean --parallelism 2
env:
OPENDBA_SNAPSHOT_VERSION: ${{ steps.version.outputs.version }}

- name: Attest everything the nightly publishes
uses: actions/attest-build-provenance@v4
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8
with:
subject-path: |
dist/*.tar.gz
Expand Down Expand Up @@ -272,4 +281,6 @@ jobs:
dist/*.tar.gz \
dist/*.zip \
dist/*.sbom.json \
dist/checksums.txt
dist/checksums.txt \
dist/checksums.txt.sig \
dist/checksums.txt.pem
4 changes: 2 additions & 2 deletions .github/workflows/release-prep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
ref: main

- uses: actions/setup-go@v7
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
with:
go-version-file: go.work
cache-dependency-path: src/tools/go.sum
Expand Down
Loading
Loading