From 46d5e88ace9c305a18a6115e07fc9c4c1bd93f83 Mon Sep 17 00:00:00 2001 From: Nicholas Wiersma Date: Tue, 3 Sep 2024 06:22:34 +0200 Subject: [PATCH] feat: do platform tests --- .github/workflows/platforms.yaml | 69 ++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/platforms.yaml diff --git a/.github/workflows/platforms.yaml b/.github/workflows/platforms.yaml new file mode 100644 index 0000000..a5477af --- /dev/null +++ b/.github/workflows/platforms.yaml @@ -0,0 +1,69 @@ +on: + push: + branches: + - main + pull_request: + +name: run platform tests +jobs: + test: + + strategy: + matrix: + matrix: + os: + - darwin + - linux + - windows + arch: + - 386 + - amd64 + - arm + - arm64 + - ppc64le + - s390x + include: + - os: linux + arch: arm + arm: 7 + exclude: + - os: darwin + arch: 386 + - os: darwin + arch: arm + - os: darwin + arch: ppc64le + - os: darwin + arch: s390x + - os: windows + arch: arm + - os: windows + arch: arm64 + - os: windows + arch: ppc64le + - os: windows + arch: s390x + runs-on: ubuntu-latest + env: + GO_VERSION: "1.23" + + steps: + - name: Install Go + if: success() + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Cache Go modules + uses: actions/cache@v4 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Run tests + run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} GOARM=${{ matrix.arm }} go test ./... \ No newline at end of file