Skip to content

Commit

Permalink
Merge pull request hyperledger-indy#2354 from mirgee/ga-workflow
Browse files Browse the repository at this point in the history
Add github actions workflow
  • Loading branch information
WadeBarnes authored May 11, 2021
2 parents 32e30b6 + 8bdc98f commit cc52f08
Show file tree
Hide file tree
Showing 24 changed files with 1,604 additions and 986 deletions.
33 changes: 33 additions & 0 deletions .github/actions/publish-android/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Publish android image'

inputs:
abis:
description: 'A space separated list of ABIs to create an artifact for'
default: 'armv7 arm64 x86 x86_64'
docker-img-name:
description: 'Name of the android image'
required: true
full-version-name:
description: 'Name of the resulting artifact'
required: true

env:
DOCKER_BUILDKIT: 1

runs:
using: "composite"
steps:
- name: Build, run android wrapper tests, and publish artifacts
run: |
docker run --name publish-android-wrapper -v $PWD:/root/indy-sdk \
-e ABIS="${{ inputs.abis }}" \
-e FULL_VERSION_NAME="${{ inputs.full-version-name }}" \
${{ inputs.docker-img-name }} \
bash -c '(cd $HOME/indy-sdk/libindy/ci/ && ./android.prepare.sh $ABIS && cd $HOME/indy-sdk/libindy && ./ga-android.build.sh $ABIS)'
docker_id=$(docker ps -a | grep android | grep Exited | tail -n 1 | cut -d ' ' -f 1)
docker_image_id=$(docker images | grep android | perl -pe 's/\s+/ /g' | cut -d ' ' -f 3)
mkdir -p /tmp/artifacts
docker cp ${docker_id}:/tmp/artifacts/libindy /tmp/artifacts
docker rm ${docker_id} > /dev/null
docker rmi ${docker_image_id} > /dev/null
shell: bash
35 changes: 35 additions & 0 deletions .github/actions/test-android/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'Publish android image'

inputs:
abi:
description: 'ABI to run tests for'
default: 'armv7 arm64 x86 x86_64'
pool_ip:
description: 'IP the indy pool run on'
default: "127.0.0.1"
required: true
android-docker-img-name:
description: 'Name of the android image'
required: true
pool-docker-img-name:
description: 'Name of the pool image'
required: true

env:
DOCKER_BUILDKIT: 1

runs:
using: "composite"
steps:
- name: Run wrapper tests
run: |
sudo rm -rf "/usr/local/share/boost" "$AGENT_TOOLSDIRECTORY" "/usr/local/lib/android" "/usr/share/dotnet"
# sleep 15 && docker rmi ${{ inputs.pool-docker-img-name }} {{ inputs.android-docker-img-name }} &
docker run --rm -d --name indypool --network host ${{ inputs.pool-docker-img-name }}
docker run --rm -i --name android --network host -v $PWD:/root/indy-sdk \
-e ABI="${{ inputs.abi }}" \
-e TEST_POOL_IP="${{ inputs.pool_ip }}" \
${{ inputs.android-docker-img-name }} \
bash -c '(cd $HOME/indy-sdk/libindy/ci/ && ./android.prepare.sh $ABI && cd $HOME/indy-sdk/libindy && ./android.test.sh $ABI)'
shell: bash
18 changes: 18 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# SPDX-License-Identifier: CC-BY-4.0
#

repository:
name: indy-sdk
description: indy-sdk
homepage: https://wiki.hyperledger.org/display/indy
default_branch: master
has_downloads: false
has_issues: true
has_projects: false
has_wiki: false
archived: false
private: false
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: true
Loading

0 comments on commit cc52f08

Please sign in to comment.