From f6f4034279d4e90df6fa819994eafaa018128d0b Mon Sep 17 00:00:00 2001 From: Vivian Kong Date: Wed, 29 May 2024 15:22:20 +0000 Subject: [PATCH] test s390x workflow --- .github/workflows/test-s390x.yml | 54 ++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/test-s390x.yml diff --git a/.github/workflows/test-s390x.yml b/.github/workflows/test-s390x.yml new file mode 100644 index 0000000000..8341872f33 --- /dev/null +++ b/.github/workflows/test-s390x.yml @@ -0,0 +1,54 @@ +name: Test +on: [push, pull_request] +jobs: + test: + strategy: + matrix: + go-versions: ['1.22', '1.21'] + platform: [ubuntu-20.04] + environment-variables: [build/config/plain.sh, build/config/libpfm4.sh, build/config/libipmctl.sh] + runs-on: [ self-hosted, linux, S390X ] #${{ matrix.platform }} + timeout-minutes: 30 + steps: + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-versions }} + check-latest: true + - name: Checkout code + uses: actions/checkout@v4 + - name: Run presubmit checks + run: | + source ${{ matrix.environment-variables }} + if [[ "${BUILD_PACKAGES}" != "" ]]; then sudo apt-get update; sudo apt-get install ${BUILD_PACKAGES}; fi + make -e presubmit + - name: Run tests + env: + GOLANG_VERSION: ${{ matrix.go-versions }} + run: | + source ${{ matrix.environment-variables }} + make test + test-integration: + strategy: + matrix: + go-versions: ['1.22', '1.21'] + platform: [ubuntu-20.04] + environment-variables: [build/config/plain.sh, build/config/libpfm4.sh, build/config/libipmctl.sh] + runs-on: [ self-hosted, linux, S390X ] #${{ matrix.platform }} + timeout-minutes: 30 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Run integration tests + env: + GOLANG_VERSION: ${{ matrix.go-versions }} + run: | + set -ex + source ${{ matrix.environment-variables }} + make docker-test-integration + - name: Upload cAdvisor log file + uses: actions/upload-artifact@v4 + if: failure() + with: + name: cadvisor.log + path: ${{ github.workspace }}/go/src/github.com/google/cadvisor/cadvisor.log