diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0091d7..f209832 100755 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,9 +63,27 @@ jobs: fail_ci_if_error: true # optional (default = false) verbose: true # optional (default = false) - - uses: yogeshlonkar/wait-for-jobs@v0 + - name: Upload Test Binary + uses: actions/upload-artifact@v2 + with: + name: host-package + path: build/host/tools/rm2fb-emu/rm2fb-test + + integration-tests: + runs-on: ubuntu-latest + needs: [build, build-host] + + strategy: + matrix: + fw_version: ['2.15.1', '3.3.2', '3.5.2'] + + steps: + - uses: actions/checkout@v3 with: - jobs: 'build' + lfs: 'true' + + - name: Install Deps + run: sudo apt-get install -y libsdl2-2.0-0 - name: Download package uses: actions/download-artifact@v2 @@ -73,6 +91,12 @@ jobs: name: package path: packages/ + - name: Download host package + uses: actions/download-artifact@v2 + with: + name: host-package + path: tools/ + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: @@ -82,13 +106,20 @@ jobs: - name: Integration Tests id: intest - run: mkdir ./tmp && ./test/integration/test.sh ${{ env.IMAGE_NAME }} ./packages/ ./build/host ./tmp + run: | + chmod +x ./tools/rm2fb-test + mkdir ./tmp + ./test/integration/test.sh \ + ${{ env.IMAGE_NAME }}${{ matrix.fw_version }} \ + ./packages/ \ + ./tools/rm2fb-test \ + ./tmp - name: Upload test results if: ${{ failure() && steps.intest.conclusion == 'failure' }} uses: actions/upload-artifact@v2 with: - name: test_failures + name: test_failures_${{ matrix.fw_version }} path: ./tmp diff --git a/test/integration/test.sh b/test/integration/test.sh index 8f6dd8f..7c79efc 100755 --- a/test/integration/test.sh +++ b/test/integration/test.sh @@ -4,7 +4,7 @@ set -eux DOCKER_IMAGE=$1 IPKS_PATH=$(readlink -f "$2") -HOST_BUILD_PATH=$(readlink -f "$3") +TEST_BINARY=$(readlink -f "$3") TEST_DIR=$(dirname -- "$(readlink -f -- "$0")") @@ -28,8 +28,7 @@ check_screenshot() { NAME="$1" SH_PATH="${TMP_DIR}/${NAME}" - "$HOST_BUILD_PATH"/tools/rm2fb-emu/rm2fb-test \ - 127.0.0.1 8888 screenshot "${SH_PATH}" + "$TEST_BINARY" 127.0.0.1 8888 screenshot "${SH_PATH}" for matches in "$@" do @@ -45,8 +44,7 @@ check_screenshot() { } tap_at() { - "$HOST_BUILD_PATH"/tools/rm2fb-emu/rm2fb-test \ - 127.0.0.1 8888 touch "$1" "$2" + "$TEST_BINARY" 127.0.0.1 8888 touch "$1" "$2" } image=$(docker run --name rm-docker --rm -d -p 2222:22 -p 8888:8888 "$DOCKER_IMAGE") @@ -62,9 +60,9 @@ scp -P 2222 "$IPKS_PATH"/*.ipk root@localhost: # Update & install display to make sure rm2fb.ipa replaces it. do_ssh systemctl restart systemd-timesyncd do_ssh opkg update -# do_ssh opkg install display || true # This fails as rm2fb fails to start. -do_ssh opkg install ./*.ipk +# Xochitl fails to install on 3.5 :( +do_ssh opkg install ./*.ipk || true do_ssh systemctl daemon-reload do_ssh systemctl start rm2fb