Skip to content

Commit

Permalink
Tmp: Remove generated test in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
spalmer25 committed Oct 11, 2023
1 parent 9a5ec35 commit dfb0afa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 129 deletions.
131 changes: 4 additions & 127 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
steps:
- name: Set Git Safe Directory
run: |
git config --global safe.directory "$GITHUB_WORKSPACE"
- name: Checkout
uses: actions/checkout@v3

Expand All @@ -94,130 +98,3 @@ jobs:
with:
name: integration_tests_${{ matrix.device }}.json
path: ./integration_tests.json

generate_samples_unit_tests:
needs: [build_docker_tezos_ocaml]
runs-on: ubuntu-latest
container:
image: ${{ needs.build_docker_tezos_ocaml.outputs.image }}
credentials:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
options: -u root --entrypoint /bin/bash
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create dirs
run: |
mkdir -p tests/samples/micheline/nanos
mkdir -p tests/samples/operations/nanos
mkdir -p tests/samples/micheline/nanosp
mkdir -p tests/samples/operations/nanosp
mkdir -p tests/samples/micheline/nanox
mkdir -p tests/samples/operations/nanox
- name: Generate
run: |
export PATH=/home/opam/.opam/4.14/bin:$PATH
dune exec ./tests/generate/generate.exe micheline 500 \
nanos tests/samples/micheline
dune exec ./tests/generate/generate.exe operations 500 \
nanos tests/samples/operations
dune exec ./tests/generate/generate.exe micheline 500 \
nanosp tests/samples/micheline
dune exec ./tests/generate/generate.exe operations 500 \
nanosp tests/samples/operations \
dune exec ./tests/generate/generate.exe micheline 500 \
nanox tests/samples/micheline
dune exec ./tests/generate/generate.exe operations 500 \
nanox tests/samples/operations
- name: Unit tests
run: |
export PATH=/home/opam/.opam/4.14/bin:$PATH
make -C tests/unit
- name: Upload results (nanos, micheline)
uses: actions/upload-artifact@v3
with:
name: nanos_samples_micheline
path: tests/samples/micheline/nanos
- name: Upload results (nanos, operations)
uses: actions/upload-artifact@v3
with:
name: nanos_samples_operations
path: tests/samples/operations/nanos

- name: Upload results (nanosp, micheline)
uses: actions/upload-artifact@v3
with:
name: nanosp_samples_micheline
path: tests/samples/micheline/nanosp

- name: Upload results (nanosp, operations)
uses: actions/upload-artifact@v3
with:
name: nanosp_samples_operations
path: tests/samples/operations/nanosp

- name: Upload results (nanox, micheline)
uses: actions/upload-artifact@v3
with:
name: nanox_samples_micheline
path: tests/samples/micheline/nanox

- name: Upload results (nanox, operations)
uses: actions/upload-artifact@v3
with:
name: nanox_samples_operations
path: tests/samples/operations/nanox

integration_tests_samples:
needs: [build_app, generate_samples_unit_tests, build_docker_integration_tests]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
device: [nanos, nanosp, nanox]
type: [micheline, operations]
container:
image: ${{ needs.build_docker_integration_tests.outputs.image }}
credentials:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download app
uses: actions/download-artifact@v3
with:
name: app_${{ matrix.device }}.tgz

- name: Download app (dbg)
uses: actions/download-artifact@v3
with:
name: app_${{ matrix.device }}_dbg.tgz

- name: Download samples
uses: actions/download-artifact@v3
with:
name: ${{ matrix.device }}_samples_${{ matrix.type }}
path: tests

- name: Test
run: ./tests/integration/run_test_local.sh -T100 -F -m ${{ matrix.device }} tests

- name: Upload results
uses: actions/upload-artifact@v3
if: always()
with:
name: integration_tests_${{ matrix.type}}_${{ matrix.device }}.json
path: ./integration_tests.json
2 changes: 2 additions & 0 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ APPVERSION_P=0
APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)

# COMMIT
$(info GIT_DESCRIBE=$(GIT_DESCRIBE))
GIT_DESCRIBE ?= $(shell git describe --tags --abbrev=8 --always --long --dirty 2>/dev/null)
$(info GIT_DESCRIBE=$(GIT_DESCRIBE))

VERSION_TAG ?= $(shell echo "$(GIT_DESCRIBE)" | cut -f1 -d-)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/run_test_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

set -e

docker run --user "$(id -u)":"$(id -g)" --rm -i --privileged -v "$(realpath .):/app" \
docker run --user "$(id -u)":"$(id -g)" --rm -i -v "$(realpath .):/app" \
--entrypoint=/bin/sh ledger-app-tezos-integration-tests \
-c "cd /app && ./tests/integration/run_test_local.sh -F -m $*"
6 changes: 5 additions & 1 deletion tests/integration/test_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@
seed="zebra`for i in $(seq 1 23) ; do echo -n ' zebra' ; done`"
OUTPUT_BARS=$(for i in $(seq 1 $((COLUMNS-18))); do echo -n =; done)

COMMIT=$(git describe --tags --abbrev=8 --always --long --dirty 2>/dev/null | sed 's/-dirty/*/')
echo "VAR"
echo "GIT_DESCRIBE=$GIT_DESCRIBE"
COMMIT=$(git describe --tags --abbrev=8 --always --long --dirty | sed 's/-dirty/*/')
echo "COMMIT=$COMMIT"
COMMIT_BYTES=$(printf '%s' "$COMMIT" | xxd -p -c 256)
echo "COMMIT_BYTES=$COMMIT_BYTES"

VERSION_WALLET_TAG="00"
APPVERSION_M=3
Expand Down

0 comments on commit dfb0afa

Please sign in to comment.