diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 50fa949..16464eb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -299,18 +299,15 @@ jobs: runs-on: ${{ matrix.os }} steps: - - name: Set up runner architecture - if: runner.os == 'Linux' && matrix.architecture == 'arm64' - run: | - if [[ "$(uname -m)" != "aarch64" ]]; then - sudo apt-get update - sudo apt-get install -y qemu-user-static binfmt-support - docker run --rm --privileged multiarch/qemu-user-static:register --reset - fi - - name: Check out repository uses: actions/checkout@v2 + - name: Set up QEMU + if: runner.os == 'Linux' && matrix.architecture == 'arm64' + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + - uses: dkershner6/switch-case-action@v1 id: pypylon-wheel-source with: @@ -334,15 +331,28 @@ jobs: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} + - name: Set up needed linux requirements + if: runner.os == 'Linux' && matrix.architecture != 'arm64' + run: | + apt-get update && apt-get install -y locales + sed -i 's/^# *\(fr_FR.UTF-8\)/\1/' /etc/locale.gen + locale-gen + - name: Run pypylon unit tests for Python ${{ matrix.python-version }} if: runner.os == 'Linux' && matrix.architecture == 'arm64' - run: | - docker run --rm --platform linux/arm64 -v $(pwd):/work -w /work arm64v8/python:${{ matrix.python-version }}-slim /bin/sh -c " - python -m pip install --upgrade pip && - pip install pytest numpy && - pip install --no-index --find-links pypylon-wheels pypylon && + uses: addnab/docker-run-action@v3 + with: + image: arm64v8/python:${{ matrix.python-version }}-slim + options: --platform linux/arm64 -v \${{ github.workspace }}:/build -w /build + run: | + apt-get update && apt-get install -y locales + sed -i 's/^# *\(fr_FR.UTF-8\)/\1/' /etc/locale.gen + locale-gen + # Install python requirements and run unit tests + python -m pip install --upgrade pip + pip install pytest numpy + pip install --no-index --find-links pypylon-wheels pypylon pytest tests/genicam_tests tests/pylon_tests/emulated - " - name: Run pypylon unit tests for Python ${{ matrix.python-version }} if: runner.os == 'macOS'