diff --git a/.circleci/config.yml b/.circleci/config.yml index 8bc6674b..184bb4a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,28 +14,10 @@ templates: - CGO_ENABLED: 0 - GO111MODULE: "auto" - go120-template: &go120-template - docker: - - image: cimg/go:1.20 - - go121-template: &go121-template - docker: - - image: cimg/go:1.21 - go122-template: &go122-template docker: - image: cimg/go:1.22 - build-gomod-multi-template: &build-gomod-multi-template - steps: - - checkout - - run: - name: build u-root & gokrazy & p9 together (workspaces) - command: ./test-external.sh - - run: - name: build u-root & cpu & p9 together (GOPATH) - command: ./test-external-gopath.sh - workflows: version: 2 build: @@ -43,30 +25,6 @@ workflows: - clean-gopath - clean-gomod - clean-makebb - - build-gomod-multi-go120: - requires: - - clean-makebb - - clean-gomod - - build-gomod-multi-go121: - requires: - - clean-makebb - - clean-gomod - - build-gomod-multi-go122: - requires: - - clean-makebb - - clean-gomod - nightly: - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: - - main - jobs: - - build-gomod-multi-go120 - - build-gomod-multi-go121 - - build-gomod-multi-go122 jobs: clean-makebb: @@ -148,11 +106,3 @@ jobs: (cd src && test -z "$(gofmt -s -l $(find -name '*.go'))") (cd test && test -z "$(gofmt -s -l $(find -name '*.go'))") - build-gomod-multi-go120: - <<: [*go120-template, *gomod-template, *build-gomod-multi-template] - - build-gomod-multi-go121: - <<: [*go121-template, *gomod-template, *build-gomod-multi-template] - - build-gomod-multi-go122: - <<: [*go122-template, *gomod-template, *build-gomod-multi-template] diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 408e8a42..9ae0fed5 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -131,3 +131,59 @@ jobs: fail_ci_if_error: true verbose: true + test-external-workspaces: + name: test-external-workspaces + runs-on: ubuntu-latest + strategy: + matrix: + goversion: ['1.20', '1.21.x', '1.22.x'] + steps: + - uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.goversion }} + + - name: Test + run: | + mkdir cover + GOCOVERDIR=$(pwd)/cover ./test-external-workspaces.sh + go tool covdata textfmt -i=cover -o cover.out + + - uses: codecov/codecov-action@036b81c4b4e8314b391265bc226440f9e2117e2a + env: + CODECOV_TOKEN: 'bf25d8b2-b4f9-43f4-b578-64eefbe31e61' + with: + flags: ${{ matrix.goversion }} + fail_ci_if_error: true + verbose: true + + test-external-gopath: + name: test-external-gopath + runs-on: ubuntu-latest + strategy: + matrix: + goversion: ['1.20', '1.21.x', '1.22.x'] + steps: + - uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.goversion }} + + - name: Test + run: | + mkdir cover + GOCOVERDIR=$(pwd)/cover ./test-external-gopath.sh + go tool covdata textfmt -i=cover -o cover.out + + - uses: codecov/codecov-action@036b81c4b4e8314b391265bc226440f9e2117e2a + env: + CODECOV_TOKEN: 'bf25d8b2-b4f9-43f4-b578-64eefbe31e61' + with: + flags: ${{ matrix.goversion }} + fail_ci_if_error: true + verbose: true + diff --git a/test-external.sh b/test-external-workspaces.sh similarity index 98% rename from test-external.sh rename to test-external-workspaces.sh index b557059d..2691fde9 100755 --- a/test-external.sh +++ b/test-external-workspaces.sh @@ -9,8 +9,7 @@ fi cd src/cmd/makebb -$GO generate -$GO build +$GO build -covermode=atomic cd ../../..