Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build and Test | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
testing: | ||
name: Build and Test | ||
runs-on: macOS-latest | ||
steps: | ||
- name: Clone Repo | ||
uses: actions/checkout@v1 | ||
|
||
- name: Set up XCode 13.0 | ||
run: sudo xcode-select -switch /Applications/Xcode_13.0.app | ||
|
||
- name: Set up Go 1.16.7 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.16.7 | ||
|
||
- name: Cache (CocoaPod & Go Mod) | ||
uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: | | ||
Pods | ||
~/go/pkg/mod | ||
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-pods- | ||
- name: CocoaPod Install | ||
run: pod install | ||
|
||
- name: Build Dcrlibwallet | ||
run: ./dcrlibwallet-ci-build.sh | ||
|
||
- name: Build Dcrios | ||
run: xcodebuild -workspace Decred\ Wallet.xcworkspace -scheme Decred\ Wallet\ Testnet -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12' clean | ||
|
||
# - name: Test Dcrios | ||
# run: xcodebuild -workspace Decred\ Wallet.xcworkspace -scheme Decred\ Wallet\ Testnet -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12' clean test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
installGo(){ | ||
echo "Installing golang" | ||
curl -O https://storage.googleapis.com/golang/go1.16.7.darwin-amd64.tar.gz | ||
sha256sum go1.16.7.darwin-amd64.tar.gz | ||
tar -xvf go1.16.7.darwin-amd64.tar.gz | ||
sudo chown -R root:root ./go | ||
sudo mv go /usr/local | ||
} | ||
|
||
installGobind(){ | ||
echo "Installing gobind" | ||
export GO111MODULE=off | ||
go get -u golang.org/x/mobile/cmd/gobind | ||
} | ||
|
||
installGomobile(){ | ||
echo "Installing gomobile" | ||
export GO111MODULE=off | ||
go get -u golang.org/x/mobile/cmd/gomobile | ||
gomobile init | ||
} | ||
|
||
if !(hash go 2>/dev/null); then | ||
installGo | ||
fi | ||
|
||
export GOPATH=$HOME/go | ||
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin | ||
|
||
if !(hash gobind 2>/dev/null); then | ||
installGobind | ||
fi | ||
|
||
if !(hash gomobile 2>/dev/null); then | ||
installGomobile | ||
fi | ||
|
||
|
||
go version | ||
echo "Building dcrlibwallet" | ||
export DcriosDir=$(pwd) | ||
mkdir -p $GOPATH/src/github.com/planetdecred | ||
git clone https://github.com/planetdecred/dcrlibwallet $GOPATH/src/github.com/planetdecred/dcrlibwallet | ||
cd $GOPATH/src/github.com/planetdecred/dcrlibwallet | ||
export GO111MODULE=on && go mod vendor && export GO111MODULE=off | ||
gomobile bind -target=ios | ||
mkdir $DcriosDir/libs | ||
rsync -a Dcrlibwallet.xcframework/ $DcriosDir/libs/Dcrlibwallet.xcframework/ && cd $DcriosDir |