From 031c6bdc129d5bde97b42b19e18687f3537ceeb0 Mon Sep 17 00:00:00 2001 From: tcchawla Date: Thu, 18 Jan 2024 17:51:53 -0500 Subject: [PATCH 01/11] added arm64 workflow Signed-off-by: tcchawla --- .github/workflows/test_arm64.yaml | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/test_arm64.yaml diff --git a/.github/workflows/test_arm64.yaml b/.github/workflows/test_arm64.yaml new file mode 100644 index 000000000000..4c791826241f --- /dev/null +++ b/.github/workflows/test_arm64.yaml @@ -0,0 +1,39 @@ +name: Test ARM64 +on: [push, pull_request] +jobs: + run: + runs-on: actuated-arm64-8cpu-32gb + strategy: + fail-fast: false + matrix: + target: + - linux-arm64-unit-test-1-cpu + - linux-arm64-unit-test-2-cpu + - linux-arm64-unit-test-4-cpu + - linux-arm64-unit-test-4-cpu-race + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.21.5" + - env: + TARGET: ${{ matrix.target }} + run: | + case "${TARGET}" in + linux-arm64-unit-test-1-cpu) + GOARCH=arm64 PASSES='unit' RACE='false' CPU='1' ./scripts/test.sh -p=4 + ;; + linux-arm64-unit-test-2-cpu) + GOARCH=arm64 PASSES='unit' RACE='false' CPU='2' ./scripts/test.sh -p=2 + ;; + linux-arm64-unit-test-4-cpu) + GOARCH=arm64 PASSES='unit' RACE='false' CPU='4' ./scripts/test.sh -p=2 + ;; + linux-arm64-unit-test-4-cpu-race) + GOARCH=arm64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2 + ;; + *) + echo "Failed to find target" + exit 1 + ;; + esac From d3de5e23d8f3b3eef3ad65f953b7b744cf231710 Mon Sep 17 00:00:00 2001 From: tcchawla Date: Thu, 18 Jan 2024 19:10:31 -0500 Subject: [PATCH 02/11] modified based on reviews Signed-off-by: tcchawla --- .github/workflows/test_arm64.yaml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test_arm64.yaml b/.github/workflows/test_arm64.yaml index 4c791826241f..254763cd694d 100644 --- a/.github/workflows/test_arm64.yaml +++ b/.github/workflows/test_arm64.yaml @@ -2,33 +2,21 @@ name: Test ARM64 on: [push, pull_request] jobs: run: - runs-on: actuated-arm64-8cpu-32gb + runs-on: actuated-arm64-8cpu-8gb strategy: fail-fast: false matrix: target: - - linux-arm64-unit-test-1-cpu - - linux-arm64-unit-test-2-cpu - - linux-arm64-unit-test-4-cpu - linux-arm64-unit-test-4-cpu-race steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: "1.21.5" + go-version: "1.21.6" - env: TARGET: ${{ matrix.target }} run: | case "${TARGET}" in - linux-arm64-unit-test-1-cpu) - GOARCH=arm64 PASSES='unit' RACE='false' CPU='1' ./scripts/test.sh -p=4 - ;; - linux-arm64-unit-test-2-cpu) - GOARCH=arm64 PASSES='unit' RACE='false' CPU='2' ./scripts/test.sh -p=2 - ;; - linux-arm64-unit-test-4-cpu) - GOARCH=arm64 PASSES='unit' RACE='false' CPU='4' ./scripts/test.sh -p=2 - ;; linux-arm64-unit-test-4-cpu-race) GOARCH=arm64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2 ;; From 028f35be682527e441cb2a39de9e8a5f1b214ac7 Mon Sep 17 00:00:00 2001 From: tcchawla Date: Fri, 19 Jan 2024 09:25:59 -0500 Subject: [PATCH 03/11] added template file Signed-off-by: tcchawla --- .github/workflows/test_template.yaml | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/test_template.yaml diff --git a/.github/workflows/test_template.yaml b/.github/workflows/test_template.yaml new file mode 100644 index 000000000000..531c4a2bce0f --- /dev/null +++ b/.github/workflows/test_template.yaml @@ -0,0 +1,44 @@ +name: Workflow Test Template +on: + workflow_call: + inputs: + runs-on: + required: false + type: string + default: ubuntu-latest + targets: + required: false + type: string + default: "['linux-unit-test-1-cpu', 'linux-unit-test-4-cpu']" +permissions: read-all + +jobs: + run: + runs-on: ${{ inputs.runs-on }} + strategy: + fail-fast: false + matrix: + target: ${{ fromJSON(input.targets) }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.21.6" + - env: + TARGET: ${{ matrix.target }} + run: | + case "${TARGET}" in + linux-amd64-unit-4-cpu-race) + GOARCH=amd64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2 + ;; + linux-386-unit-1-cpu) + GOARCH=386 PASSES='unit' RACE='false' CPU='1' ./scripts/test.sh -p=4 + ;; + linux-arm64-unit-test-4-cpu-race) + GOARCH=arm64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2 + ;; + *) + echo "Failed to find target" + exit 1 + ;; + esac From f52323e478ea5c991b9b2017657b0234726f7835 Mon Sep 17 00:00:00 2001 From: tcchawla Date: Fri, 19 Jan 2024 09:30:15 -0500 Subject: [PATCH 04/11] modified arm64 workflow file Signed-off-by: tcchawla --- .github/workflows/test_arm64.yaml | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/.github/workflows/test_arm64.yaml b/.github/workflows/test_arm64.yaml index 254763cd694d..6b5ad901955d 100644 --- a/.github/workflows/test_arm64.yaml +++ b/.github/workflows/test_arm64.yaml @@ -1,27 +1,10 @@ name: Test ARM64 +permissions: read-all on: [push, pull_request] jobs: run: - runs-on: actuated-arm64-8cpu-8gb - strategy: - fail-fast: false - matrix: - target: - - linux-arm64-unit-test-4-cpu-race - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: "1.21.6" - - env: - TARGET: ${{ matrix.target }} - run: | - case "${TARGET}" in - linux-arm64-unit-test-4-cpu-race) - GOARCH=arm64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2 - ;; - *) - echo "Failed to find target" - exit 1 - ;; - esac + uses: ./.github/workflows/test_template.yaml + with: + runs-on: actuated-arm64-8cpu-8gb + targets: "['linux-arm64-unit-test-4-cpu-race']" + From a55930d5b452971c89429bd75d6cb8804ebec92e Mon Sep 17 00:00:00 2001 From: tcchawla Date: Fri, 19 Jan 2024 09:36:23 -0500 Subject: [PATCH 05/11] modified amd64 workflow file Signed-off-by: tcchawla --- .github/workflows/test.yaml | 41 +++++++++---------------------- .github/workflows/test_arm64.yaml | 1 - 2 files changed, 11 insertions(+), 31 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9c4c29436aa8..6782fea59fd1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,31 +1,12 @@ -name: Test +name: Test AMD64 +permissions: read-all on: [push, pull_request] -jobs: - run: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - target: - - linux-amd64-unit-4-cpu-race - - linux-386-unit-1-cpu - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: "1.21.5" - - env: - TARGET: ${{ matrix.target }} - run: | - case "${TARGET}" in - linux-amd64-unit-4-cpu-race) - GOARCH=amd64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2 - ;; - linux-386-unit-1-cpu) - GOARCH=386 PASSES='unit' RACE='false' CPU='1' ./scripts/test.sh -p=4 - ;; - *) - echo "Failed to find target" - exit 1 - ;; - esac +jobs: + test-linux-amd64: + uses: ./.github/workflows/test_template.yaml + with: + targets: "['linux-amd64-unit-4-cpu-race']" + test-linux-386: + uses: ./.github/workflows/test_template.yaml + with: + targets: "['linux-386-unit-1-cpu']" diff --git a/.github/workflows/test_arm64.yaml b/.github/workflows/test_arm64.yaml index 6b5ad901955d..e29288cf8aaa 100644 --- a/.github/workflows/test_arm64.yaml +++ b/.github/workflows/test_arm64.yaml @@ -7,4 +7,3 @@ jobs: with: runs-on: actuated-arm64-8cpu-8gb targets: "['linux-arm64-unit-test-4-cpu-race']" - From fea068be098d1c6494d68bdfa78996d3e3ffe175 Mon Sep 17 00:00:00 2001 From: tcchawla Date: Fri, 19 Jan 2024 09:39:12 -0500 Subject: [PATCH 06/11] renamed amd64 workflow file Signed-off-by: tcchawla --- .github/workflows/{test.yaml => test_amd64.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{test.yaml => test_amd64.yaml} (100%) diff --git a/.github/workflows/test.yaml b/.github/workflows/test_amd64.yaml similarity index 100% rename from .github/workflows/test.yaml rename to .github/workflows/test_amd64.yaml From f50f8d23513eb9907cc1ee210788294b595cfa90 Mon Sep 17 00:00:00 2001 From: tcchawla Date: Fri, 19 Jan 2024 11:09:22 -0500 Subject: [PATCH 07/11] added coverage Signed-off-by: tcchawla --- .github/workflows/test_amd64.yaml | 14 ++++++++++++++ .github/workflows/test_arm64.yaml | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_amd64.yaml b/.github/workflows/test_amd64.yaml index 6782fea59fd1..be3add4809f6 100644 --- a/.github/workflows/test_amd64.yaml +++ b/.github/workflows/test_amd64.yaml @@ -10,3 +10,17 @@ jobs: uses: ./.github/workflows/test_template.yaml with: targets: "['linux-386-unit-1-cpu']" + + coverage: + needs: + - test-linux-amd64 + - test-linux-386 + runs-on: ubuntu-latest-8-cores + steps: + - uses: actions/checkout@v4 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" + - uses: actions/setup-go@v5 + with: + go-version: ${{ steps.goversion.outputs.goversion }} + - run: make test \ No newline at end of file diff --git a/.github/workflows/test_arm64.yaml b/.github/workflows/test_arm64.yaml index e29288cf8aaa..9db60e9cfdaa 100644 --- a/.github/workflows/test_arm64.yaml +++ b/.github/workflows/test_arm64.yaml @@ -2,8 +2,21 @@ name: Test ARM64 permissions: read-all on: [push, pull_request] jobs: - run: + test-linux-arm64-cpu-race: uses: ./.github/workflows/test_template.yaml with: runs-on: actuated-arm64-8cpu-8gb targets: "['linux-arm64-unit-test-4-cpu-race']" + + coverage: + needs: + - test-linux-arm64-cpu-race + runs-on: actuated-arm64-8cpu-8gb + steps: + - uses: actions/checkout@v4 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" + - uses: actions/setup-go@v5 + with: + go-version: ${{ steps.goversion.outputs.goversion }} + - run: make test From 44216f60c26813ff9e2981f5469a649626de6317 Mon Sep 17 00:00:00 2001 From: tcchawla Date: Fri, 19 Jan 2024 16:02:58 -0500 Subject: [PATCH 08/11] fixed typo Signed-off-by: tcchawla --- .github/workflows/test_template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_template.yaml b/.github/workflows/test_template.yaml index 531c4a2bce0f..1129726a17ce 100644 --- a/.github/workflows/test_template.yaml +++ b/.github/workflows/test_template.yaml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - target: ${{ fromJSON(input.targets) }} + target: ${{ fromJSON(inputs.targets) }} steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 From ddb04d451bd653ac5bca6f3bf29bd03888fabbb5 Mon Sep 17 00:00:00 2001 From: tcchawla Date: Fri, 19 Jan 2024 16:05:46 -0500 Subject: [PATCH 09/11] fixed goversion error Signed-off-by: tcchawla --- .github/workflows/test_amd64.yaml | 2 +- .github/workflows/test_arm64.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_amd64.yaml b/.github/workflows/test_amd64.yaml index be3add4809f6..cc85b90be63b 100644 --- a/.github/workflows/test_amd64.yaml +++ b/.github/workflows/test_amd64.yaml @@ -22,5 +22,5 @@ jobs: run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@v5 with: - go-version: ${{ steps.goversion.outputs.goversion }} + go-version: "1.21.6" - run: make test \ No newline at end of file diff --git a/.github/workflows/test_arm64.yaml b/.github/workflows/test_arm64.yaml index 9db60e9cfdaa..3ec155ad0b9e 100644 --- a/.github/workflows/test_arm64.yaml +++ b/.github/workflows/test_arm64.yaml @@ -18,5 +18,5 @@ jobs: run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@v5 with: - go-version: ${{ steps.goversion.outputs.goversion }} + go-version: "1.21.6" - run: make test From bb96166331159eb0a7cc67d1b61bf7f6f8ee3803 Mon Sep 17 00:00:00 2001 From: tcchawla Date: Fri, 19 Jan 2024 16:13:10 -0500 Subject: [PATCH 10/11] fixed goversion error Signed-off-by: tcchawla --- .github/workflows/test_amd64.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_amd64.yaml b/.github/workflows/test_amd64.yaml index cc85b90be63b..c6476a68bb72 100644 --- a/.github/workflows/test_amd64.yaml +++ b/.github/workflows/test_amd64.yaml @@ -15,7 +15,7 @@ jobs: needs: - test-linux-amd64 - test-linux-386 - runs-on: ubuntu-latest-8-cores + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - id: goversion From 32762197d12ced0724de1eb940295bc274227508 Mon Sep 17 00:00:00 2001 From: tcchawla Date: Fri, 19 Jan 2024 16:49:00 -0500 Subject: [PATCH 11/11] fixed review comments Signed-off-by: tcchawla --- .github/workflows/test_arm64.yaml | 15 +-------------- .github/workflows/test_template.yaml | 5 +++-- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test_arm64.yaml b/.github/workflows/test_arm64.yaml index 3ec155ad0b9e..e9db42402d87 100644 --- a/.github/workflows/test_arm64.yaml +++ b/.github/workflows/test_arm64.yaml @@ -6,17 +6,4 @@ jobs: uses: ./.github/workflows/test_template.yaml with: runs-on: actuated-arm64-8cpu-8gb - targets: "['linux-arm64-unit-test-4-cpu-race']" - - coverage: - needs: - - test-linux-arm64-cpu-race - runs-on: actuated-arm64-8cpu-8gb - steps: - - uses: actions/checkout@v4 - - id: goversion - run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - - uses: actions/setup-go@v5 - with: - go-version: "1.21.6" - - run: make test + targets: "['linux-arm64-unit-4-cpu-race']" diff --git a/.github/workflows/test_template.yaml b/.github/workflows/test_template.yaml index 1129726a17ce..9bce0b5d371a 100644 --- a/.github/workflows/test_template.yaml +++ b/.github/workflows/test_template.yaml @@ -9,7 +9,7 @@ on: targets: required: false type: string - default: "['linux-unit-test-1-cpu', 'linux-unit-test-4-cpu']" + default: "[]" permissions: read-all jobs: @@ -27,6 +27,7 @@ jobs: - env: TARGET: ${{ matrix.target }} run: | + go clean -testcache case "${TARGET}" in linux-amd64-unit-4-cpu-race) GOARCH=amd64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2 @@ -34,7 +35,7 @@ jobs: linux-386-unit-1-cpu) GOARCH=386 PASSES='unit' RACE='false' CPU='1' ./scripts/test.sh -p=4 ;; - linux-arm64-unit-test-4-cpu-race) + linux-arm64-unit-4-cpu-race) GOARCH=arm64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2 ;; *)