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
6 changes: 6 additions & 0 deletions adbc_drivers_dev/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ class LangBuildConfig(BaseModel):
description="A list of additional arguments to pass to adbc-make.",
)

go_mod_path: str = Field(
default="go",
alias="go-mod-path",
description="Path containing the go.mod file for Go drivers. Used to cache dependencies in CI.",
)

lang_tools: list[str] = Field(
default_factory=list,
alias="lang-tools",
Expand Down
17 changes: 16 additions & 1 deletion adbc_drivers_dev/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,27 @@ def build_script(
# Force use of Git Bash on GitHub Actions
args = [r"C:\Program Files\Git\bin\bash.EXE", *args]

toolchain = get_var("TOOLCHAIN", "")
if not toolchain:
raise ValueError("Must specify TOOLCHAIN=toolchain for script-based build")

container = {
"go": "manylinux",
"rust": "manylinux-rust",
}.get(toolchain)
if container is None:
raise ValueError(f"Unsupported TOOLCHAIN={toolchain} for script-based build")

# if we're using a script, don't invoke docker for Go; the script itself
# will invoke docker

maybe_build_docker(
repo_root=repo_root,
driver_root=driver_root,
env=env,
args=args,
ci=ci,
ci=ci and toolchain != "go",
container=container,
)

output = (repo_root / "build" / target).resolve()
Expand Down
16 changes: 8 additions & 8 deletions adbc_drivers_dev/templates/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ jobs:
<% if "go" in lang_tools %>
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
cache-dependency-path: go/go.sum
cache-dependency-path: <{lang_config.build.go_mod_path}>/go.sum
check-latest: true
go-version-file: go/go.mod
go-version-file: <{lang_config.build.go_mod_path}>/go.mod
<% endif %>
<% if "rust" in lang_tools %>
- uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1.15.2
Expand Down Expand Up @@ -323,9 +323,9 @@ jobs:
<% if "go" in lang_tools %>
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
cache-dependency-path: go/go.sum
cache-dependency-path: <{lang_config.build.go_mod_path}>/go.sum
check-latest: true
go-version-file: go/go.mod
go-version-file: <{lang_config.build.go_mod_path}>/go.mod
<% endif %>
<% if "rust" in lang_tools %>
- uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1.15.2
Expand Down Expand Up @@ -504,9 +504,9 @@ jobs:
<% if "go" in lang_tools %>
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
cache-dependency-path: go/go.sum
cache-dependency-path: <{lang_config.build.go_mod_path}>/go.sum
check-latest: true
go-version-file: go/go.mod
go-version-file: <{lang_config.build.go_mod_path}>/go.mod
<% endif %>
<% if "rust" in lang_tools %>
- uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1.15.2
Expand Down Expand Up @@ -843,8 +843,8 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: <{ lang_subdir }>
run: |
git tag go/v1000.0.0
tag=go/v1000.0.0
git tag <{ lang_subdir }>/v1000.0.0
tag=<{ lang_subdir }>/v1000.0.0

pixi run release --dry-run $(pwd) $tag
echo gh release upload $tag $(find ~/packages -name '*.tar.gz') $(find ~/packages -name 'manifest.yaml') $(find ~/packages -name '*.md')
Expand Down