Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[internal] go: enable plugin in repo and cleanup test project #13018

Merged
merged 4 commits into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
16 changes: 16 additions & 0 deletions .github/workflows/test-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ jobs:
}}.*'']" >> $GITHUB_ENV

'
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.1
- name: Cache Rust toolchain
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -203,6 +207,10 @@ jobs:
}}.*'']" >> $GITHUB_ENV

'
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.1
- name: Cache Rust toolchain
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -328,6 +336,10 @@ jobs:
}}.*'']" >> $GITHUB_ENV

'
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.1
- name: Cache Pants Virtualenv
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -485,6 +497,10 @@ jobs:
with:
distribution: adopt
java-version: '11'
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ jobs:
}}.*'']" >> $GITHUB_ENV

'
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.1
- name: Cache Rust toolchain
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -202,6 +206,10 @@ jobs:
}}.*'']" >> $GITHUB_ENV

'
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.1
- name: Cache Rust toolchain
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -503,6 +511,10 @@ jobs:
}}.*'']" >> $GITHUB_ENV

'
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.1
- name: Cache Pants Virtualenv
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -658,6 +670,10 @@ jobs:
with:
distribution: adopt
java-version: '11'
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions build-support/bin/generate_github_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ def test_workflow_jobs(python_versions: list[str], *, cron: bool) -> Jobs:
"steps": [
*checkout(),
*setup_primary_python(),
install_go(),
*bootstrap_caches(),
setup_toolchain_auth(),
{"name": "Bootstrap Pants", "run": "./pants --version\n"},
Expand Down Expand Up @@ -359,6 +360,7 @@ def test_workflow_jobs(python_versions: list[str], *, cron: bool) -> Jobs:
"steps": [
*checkout(),
*setup_primary_python(),
install_go(),
pants_virtualenv_cache(),
native_binaries_download(),
setup_toolchain_auth(),
Expand All @@ -379,6 +381,7 @@ def test_workflow_jobs(python_versions: list[str], *, cron: bool) -> Jobs:
"steps": [
*checkout(),
*setup_primary_python(),
install_go(),
*bootstrap_caches(),
setup_toolchain_auth(),
{"name": "Bootstrap Pants", "run": "./pants --version\n"},
Expand All @@ -405,6 +408,7 @@ def test_workflow_jobs(python_versions: list[str], *, cron: bool) -> Jobs:
"steps": [
*checkout(),
install_jdk(),
install_go(),
*setup_primary_python(),
expose_all_pythons(),
pants_virtualenv_cache(),
Expand Down
7 changes: 1 addition & 6 deletions pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ backend_packages.add = [
"pants.backend.shell.lint.shellcheck",
"pants.backend.shell.lint.shfmt",
"pants.backend.experimental.docker",
"pants.backend.experimental.go",
"pants.backend.experimental.java",
"pants.backend.experimental.python",
"internal_plugins.releases",
Expand Down Expand Up @@ -46,12 +47,6 @@ pants_ignore.add = [
"!/pants.pex",
]

build_ignore.add = [
# Disable Go targets because the Go backend is experimental (as it is under active development),
# and thus is not enabled by default.
"/testprojects/src/go/**",
]

# NB: Users must still set `--remote-cache-{read,write}` to enable the remote cache.
remote_store_address = "grpcs://cache.toolchain.com:443"
remote_instance_name = "main"
Expand Down
7 changes: 1 addition & 6 deletions testprojects/src/go/pants_test/BUILD
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

go_package(
# import_path="github.com/toolchainlabs/toolchain/src/go/src/toolchain/pants_test",
import_path="main",
dependencies=["./bar:bar"],
)
go_package()

go_binary(
name="bin",
binary_name="bin",
main=":pants_test",
)