Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernrennfanz committed Dec 5, 2024
1 parent 67b34ac commit 03e46bb
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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'
Expand Down

0 comments on commit 03e46bb

Please sign in to comment.