Skip to content

Commit

Permalink
Add CI for linux/arm64, darwin/arm64
Browse files Browse the repository at this point in the history
Use CircleCI to add CI for this.
  • Loading branch information
arp242 committed Oct 16, 2022
1 parent 06c044b commit ac295ed
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 1 deletion.
80 changes: 80 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
version: 2.1
workflows:
main:
jobs: ['linux-arm64', 'ios']

jobs:
# linux/arm64
linux-arm64:
machine:
image: ubuntu-2204:2022.07.1
resource_class: arm.medium
working_directory: ~/repo
steps:
- checkout

- run:
name: install-go
command: |
sudo apt -y install golang
- run:
name: test
command: |
uname -a
go version
go test -race ./...
# iOS
ios:
macos:
xcode: 12.5.1
working_directory: ~/repo
steps:
- checkout

- run:
name: install-go
command: |
export HOMEBREW_NO_AUTO_UPDATE=1
brew install go
- run:
name: test
environment:
SCAN_DEVICE: iPhone 6
SCAN_SCHEME: WebTests
command: |
export PATH=$PATH:/usr/local/Cellar/go/*/bin
uname -a
go version
go test -race ./...
# This is just Linux x86_64; also need to get a Go with GOOS=android, but
# there aren't any pre-built versions of that on the Go site. Idk, disable for
# now; number of people using Go on Android is probably very tiny, and the
# number of people using Go with this lib smaller still.
# android:
# machine:
# image: android:2022.01.1
# working_directory: ~/repo
# steps:
# - checkout

# - run:
# name: install-go
# command: |
# v=1.19.2
# curl --silent --show-error --location --fail --retry 3 --output /tmp/go${v}.tgz \
# "https://go.dev/dl/go$v.linux-arm64.tar.gz"
# sudo tar -C /usr/local -xzf /tmp/go${v}.tgz
# rm /tmp/go${v}.tgz

# - run:
# name: test
# command: |
# uname -a
# export PATH=/usr/local/go/bin:$PATH
# go version
# go test -race ./...
#
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,12 @@ jobs:
run: |
set -x
for a in $(go tool dist list); do
GOOS=${a%%/*} GOARCH=${a#*/} go build
export GOOS=${a%%/*}
export GOARCH=${a#*/}
go test -c
# Building for Android or iOS requires cgo
if [ "$GOOS" != 'android' ] && [ "$GOOS" != 'ios' ]; then
go build ./cmd/fsnotify
fi
done

0 comments on commit ac295ed

Please sign in to comment.