-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport CI changes to 1.1.x (#12824)
* Merge pull request #11889 from hashicorp/build-update-circle build: upgrade circleci configuration * Merge pull request #12299 from hashicorp/ci-parallel ci: trade test parallelization for unconstrained gomaxprocs * Merge pull request #12321 from hashicorp/ci-less-logging ci: limit gotestsum to circle ci * CI: build binaries for UI branches (#12594) Build binaries for every code change, not just backend code changes. This means that we'll have up-to-date compiled assets for every commit available in CircleCI artifacts. * cgutil test: reserve only a single CPU for AddAlloc test Reserving the entire machine's worth of CPUs for the `AddAlloc` test triggers a condition where the empty shared CPUs defaults to the parent CPU set on some system configurations. This was done in `main` as part of cgroups v2 work, but we need to backport this to earlier branches in order to use the same machines across branches. Co-authored-by: Seth Hoenig <seth.a.hoenig@gmail.com> Co-authored-by: Tim Gross <tgross@hashicorp.com>
- Loading branch information
1 parent
16d6dec
commit e50eea3
Showing
411 changed files
with
4,664 additions
and
2,679 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:improvement | ||
build: upgrade and speedup circleci configuration | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package ci | ||
|
||
import ( | ||
"os" | ||
"strconv" | ||
"testing" | ||
) | ||
|
||
// SkipSlow skips a slow test unless NOMAD_SLOW_TEST is set to a true value. | ||
func SkipSlow(t *testing.T, reason string) { | ||
value := os.Getenv("NOMAD_SLOW_TEST") | ||
run, err := strconv.ParseBool(value) | ||
if !run || err != nil { | ||
t.Skipf("Skipping slow test: %s", reason) | ||
} | ||
} | ||
|
||
// Parallel runs t in parallel, unless CI is set to a true value. | ||
// | ||
// In CI (CircleCI / GitHub Actions) we get better performance by running tests | ||
// in serial while not restricting GOMAXPROCS. | ||
func Parallel(t *testing.T) { | ||
value := os.Getenv("CI") | ||
isCI, err := strconv.ParseBool(value) | ||
if !isCI || err != nil { | ||
t.Parallel() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.