This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
[wip] replace pyxrt which does unexplainable things... #263
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [assigned, opened, synchronize, reopened] | |
#concurrency: | |
# group: test-${{ github.event.number || github.sha }} | |
# cancel-in-progress: true | |
jobs: | |
test-x86: | |
runs-on: ${{ matrix.OS }} | |
strategy: | |
fail-fast: false | |
matrix: | |
OS: [ ubuntu-20.04, windows-2019 ] | |
PY_VERSION: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout actions | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Get Submodules | |
run: | | |
git submodule update --init --recursive | |
- uses: ./.github/workflows/base | |
id: base | |
with: | |
OS: ${{ matrix.OS }} | |
ARCH: ${{ matrix.ARCH }} | |
PY_VERSION: ${{ matrix.PY_VERSION }} | |
- name: build wheel | |
env: | |
BOOST_ROOT: ${{ steps.base.outputs.BOOST_ROOT }} | |
BOOST_VERSION: ${{ steps.base.outputs.BOOST_VERSION }} | |
run: | | |
REPO_SRC_DIR=$PWD bash patches/apply_patches.sh | |
CIBW_BUILD=${{ matrix.PY_VERSION }} | |
export CIBW_BUILD="cp${CIBW_BUILD//./}-*" | |
cibuildwheel --output-dir wheelhouse | |
- name: test | |
run: | | |
pushd wheelhouse | |
pip install xaiepy -f $PWD | |
if [ ${{ matrix.OS }} == 'windows-2019' ]; then | |
pytest -s ../tests | |
else | |
pytest --capture=tee-sys ../tests | |
fi | |
popd | |
- name: Test mwe | |
shell: bash | |
run: | | |
pushd examples | |
python gen_example.py | |
popd | |
test-linux-aarch64: | |
runs-on: ${{ matrix.OS }} | |
strategy: | |
fail-fast: false | |
matrix: | |
OS: [ ubuntu-20.04 ] | |
PY_VERSION: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] | |
steps: | |
- name: Checkout actions | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Get Submodules | |
run: | | |
git submodule update --init --recursive | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: aarch64 | |
- uses: ./.github/workflows/base | |
id: base | |
with: | |
OS: ${{ matrix.OS }} | |
ARCH: ${{ matrix.ARCH }} | |
PY_VERSION: ${{ matrix.PY_VERSION }} | |
- name: build wheel | |
env: | |
BOOST_ROOT: ${{ steps.base.outputs.BOOST_ROOT }} | |
BOOST_VERSION: ${{ steps.base.outputs.BOOST_VERSION }} | |
run: | | |
REPO_SRC_DIR=$PWD bash patches/apply_patches.sh | |
CIBW_BUILD=${{ matrix.PY_VERSION }} | |
export CIBW_BUILD="cp${CIBW_BUILD//./}-*" | |
cibuildwheel --output-dir wheelhouse | |
- name: test | |
run: | | |
pushd wheelhouse | |
pip install xaiepy -f $PWD | |
pytest -s ../tests/*.py | |
popd | |
- name: Test mwe | |
shell: bash | |
run: | | |
export LD_LIBRARY_PATH=/opt/xilinx/xrt/lib | |
pushd examples | |
python gen_example.py | |
popd |