Skip to content

Commit

Permalink
Compatibility tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jjanowsk committed Jul 11, 2023
1 parent b6007bf commit dd853db
Show file tree
Hide file tree
Showing 22 changed files with 2,013 additions and 60 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Test generators
on: [pull_request, push]

env:
IMAGE_NAME: generators
IMAGE_PATH: /tmp/generators.tar

jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: .
tags: ${{ env.IMAGE_NAME }}:test
outputs: type=docker,dest=${{ env.IMAGE_PATH }}
- uses: actions/upload-artifact@v3
with:
name: ${{ env.IMAGE_NAME }}
path: ${{ env.IMAGE_PATH }}

build-test-libs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.64.0
default: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --package compatibility-test
- uses: actions/upload-artifact@v3
with:
name: test-libs
path: |
target/debug/libuniffi_coverall.so
target/debug/libuniffi_coverall.a
test:
runs-on: ubuntu-latest
needs: [build-docker, build-test-libs]
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: actions/download-artifact@v3
with:
name: ${{ env.IMAGE_NAME }}
path: /tmp
- uses: actions/download-artifact@v3
with:
name: test-libs
path: target/debug
- name: Load docker image
run: |
docker load --input ${{ env.IMAGE_PATH }}
- name: Run tests
run: |
sudo ./test_generators.sh
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ target/

# These are backup files generated by rustfmt
**/*.rs.bk

compatibility-test/tmp/
Loading

0 comments on commit dd853db

Please sign in to comment.