From 0b0914a82d58c7bc4aa9ca5779647e6f0e5b6c99 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Tue, 7 Oct 2025 15:10:45 +0800 Subject: [PATCH] ci: add loong64 qemu test --- .github/workflows/test_loong64.yml | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/test_loong64.yml diff --git a/.github/workflows/test_loong64.yml b/.github/workflows/test_loong64.yml new file mode 100644 index 0000000..93ccb77 --- /dev/null +++ b/.github/workflows/test_loong64.yml @@ -0,0 +1,46 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: loong64-qemu + +on: + push: + branches: [ "develop", "main" ] + pull_request: + branches: [ "develop", "main" ] + +permissions: + contents: read + +jobs: + + test: + strategy: + matrix: + go-version: [1.24.x] + arch: [loong64] + runs-on: ubuntu-latest + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 + with: + egress-policy: audit + + - name: Set up Go + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 + with: + go-version: ${{ matrix.go-version }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 + with: + image: ghcr.io/loong64/binfmt:latest + + - name: Check out code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + + - name: Test + run: go test -v -short ./internal/... + env: + GODEBUG: x509sha1=1 + GOARCH: ${{ matrix.arch }}