Skip to content

Commit

Permalink
.github/workflows: Add emulated tests for riscv64 and s390x.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaq committed Aug 15, 2024
1 parent 6e29dd8 commit 299b1ce
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ defaults:
jobs:

test:
# The default name will include the "go-version-is" parameter, whcih is
# derived from go-version and redundant, so we supply an explicit templated
# name.
# The default name will include the "go-version-is" parameter below, which
# is derived from go-version and redundant, so we supply an explicit
# templated name.
name: Run tests (${{ matrix.os }}, ${{ matrix.go-version }})
strategy:
matrix:
Expand Down Expand Up @@ -54,6 +54,31 @@ jobs:
name: cover-${{ matrix.os == 'ubuntu' && 'linux' || matrix.os }}
path: cover

emulated_tests:
name: Run tests (emulated ${{ matrix.go-arch }})
strategy:
matrix:
go-arch: [riscv64, s390x]
env:
ELVISH_TEST_TIME_SCALE: 20
GOARCH: ${{ matrix.go-arch }}
runs-on: ubuntu-latest
steps:
- name: Set up emulator
run: |
sudo apt install binfmt-support qemu-user-static
update-binfmts --display
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Test with emulator
run: |
go test -race ./...
cd website; go test -race ./...
# The purpose of running benchmarks in GitHub Actions is primarily to ensure
# that the benchmark code runs and doesn't crash. GitHub Action runners don't
# have a stable enough environment to produce reliable benchmark numbers.
Expand Down

0 comments on commit 299b1ce

Please sign in to comment.