Migrate CI to actions, build artifacts (#89)

* Create go workflow

* Delete travis config

* Update build script

* Create apple workflow

* Create android workflow

Co-authored-by: marin thiercelin <marin.thiercelin@pm.me>
This commit is contained in:
wussler 2020-10-19 10:07:25 +02:00 committed by GitHub
parent d53bd4a351
commit 6b2ac0b11c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 263 additions and 123 deletions

33
.github/workflows/android.yml vendored Normal file
View file

@ -0,0 +1,33 @@
name: Gomobile for Android
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build library for Android with gomobile
runs-on: ubuntu-latest
steps:
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
./build.sh android
find build
- name: Upload Android artifacts
uses: actions/upload-artifact@v2
with:
name: Android build
path: build/android
if-no-files-found: error

38
.github/workflows/go.yml vendored Normal file
View file

@ -0,0 +1,38 @@
name: Go test and lint
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
go install github.com/golangci/golangci-lint/cmd/golangci-lint
- name: Test
run: go test -v -race ./...
- name: Lint
run: golangci-lint run ./...

70
.github/workflows/ios.yml vendored Normal file
View file

@ -0,0 +1,70 @@
name: Gomobile for iOS
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build library for iOS with gomobile
runs-on: macos-latest
steps:
- name: Set up xcode 12.2
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 12.2
id: xcode
- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
go-version: ^1.15
id: go
- name: Checkout
uses: actions/checkout@v2
- name: Build
env:
platform: ${{ 'iOS Simulator' }}
run: |
./build.sh apple
find build
- name: Upload iOS artifacts
uses: actions/upload-artifact@v2
with:
name: iOS build
path: build/ios
if-no-files-found: error
- name: Upload mac OS artifacts
uses: actions/upload-artifact@v2
with:
name: mac OS build
path: build/macos
if-no-files-found: error
- name: Upload mac OS ui artifacts
uses: actions/upload-artifact@v2
with:
name: mac OS ui build
path: build/macos-ui
if-no-files-found: error
- name: Upload iOS simulator artifacts
uses: actions/upload-artifact@v2
with:
name: iOS simulator build
path: build/ios-simulator
if-no-files-found: error
- name: Upload xcframework
uses: actions/upload-artifact@v2
with:
name: Gopenpgp xcframework
path: build/Gopenpgp.xcframework
if-no-files-found: error