Skip to content

Commit

Permalink
Merge pull request #21 from ovechkin-dm/20-add-support-for-arm64-arch…
Browse files Browse the repository at this point in the history
…itecture

arm64 support
  • Loading branch information
ovechkin-dm authored Aug 21, 2023
2 parents fa5b369 + 9f1d1b3 commit fbe0025
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:
fail-fast: false
matrix:
os: [ darwin, linux, windows ]
arch: [ amd64 ]
go: [ '1.18', '1.19', '1.20' ]
arch: [ amd64, arm64 ]
go: [ '1.20', '1.21' ]
include:
- os: darwin
runs-on: macos-latest
Expand All @@ -72,19 +72,24 @@ jobs:
go-version: ${{ matrix.go }}

- name: 'Test on darwin'
if: ${{ matrix.os == 'darwin' }}
if: ${{ matrix.os == 'darwin' && contains(fromJson('["amd64"]'), matrix.arch) }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go test -v -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./mock/... ./...

- name: 'Test on linux'
if: ${{ matrix.os == 'linux' }}
if: ${{ matrix.os == 'linux' && contains(fromJson('["amd64"]'), matrix.arch) }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go test -v -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./mock/... ./...

- name: 'Test on [linux] arch [arm64]'
if: ${{ matrix.os == 'linux' && contains(fromJson('["arm64"]'), matrix.arch) }}

run: go test -coverpkg=./mock/... ./...


- name: 'Test on windows'
if: ${{ matrix.os == 'windows' && contains(fromJson('["amd64"]'), matrix.arch) }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ The mock package provides a powerful library for creating and managing mock obje


## Limitations
* **Restricted support for processor architectures**. For now library only supports amd64 architecture, but can be extended to others if there is demand for it.
* **Restricted support for processor architectures**. For now library only supports amd64 and arm64 architectures, but can be extended to others if there is demand for it.
* **Go >= 1.18**
* **Concurrency limitations**
* For now, you have to use every call to library in the same goroutine, on which `SetUp()` was called.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/ovechkin-dm/mockio
go 1.20

require (
github.com/ovechkin-dm/go-dyno v0.0.11
github.com/ovechkin-dm/go-dyno v0.0.12
github.com/timandy/routine v1.1.1
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/ovechkin-dm/go-dyno v0.0.11 h1:inouInAWkQf6ySi8lrQ+AaAJdj8/3f4fhVDboVB1RZQ=
github.com/ovechkin-dm/go-dyno v0.0.11/go.mod h1:06OT6ztP0Y4rO1lXEn3oB2u/ErA5dxCCjkEpa54L5Jw=
github.com/ovechkin-dm/go-dyno v0.0.12 h1:FSFntI2sOnQGzZr09jsYyW+pzMewifjscPorzAiDXLs=
github.com/ovechkin-dm/go-dyno v0.0.12/go.mod h1:06OT6ztP0Y4rO1lXEn3oB2u/ErA5dxCCjkEpa54L5Jw=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/timandy/routine v1.1.1 h1:6/Z7qLFZj3GrzuRksBFzIG8YGUh8CLhjnnMePBQTrEI=
Expand Down

0 comments on commit fbe0025

Please sign in to comment.