Skip to content

Add support for Linux ARM for Python wheels #242

Add support for Linux ARM for Python wheels

Add support for Linux ARM for Python wheels #242

Workflow file for this run

name: .NET Standard C#
on:
push:
branches: [ "master" ]
tags: [ "*" ]
pull_request:
branches: [ "*" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
buildtype: ["Debug", "Release"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Setup Git name
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git --version
mkdir dist
- name: Configure Windows
if: ${{ startsWith(matrix.os, 'windows') }}
run: cmake ${{github.workspace}} -Ax64 -B${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DPACKAGE_OUTPUT_FILE_PREFIX=${{github.workspace}}/dist -DENABLE_SWIG=ON -DENABLE_PORTABLE=ON -DENABLE_EXAMPLES=OFF -DENABLE_CSHARP=ON -DENABLE_PYTHON=OFF -DCSHARP_TEST_FRAMEWORK=netcoreapp8
- name: Install Swig
if: ${{ startsWith(matrix.os, 'macOS') }}
run: pip install swig==4.0.2 --prefix="$(pwd)/usr"
- name: Configure OSX
if: ${{ startsWith(matrix.os, 'macOS') }}
run: cmake ${{github.workspace}} -B${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DPACKAGE_OUTPUT_FILE_PREFIX=${{github.workspace}}/dist -DENABLE_SWIG=ON -DENABLE_PORTABLE=ON -DENABLE_EXAMPLES=OFF -DENABLE_CSHARP=ON -DENABLE_PYTHON=OFF -DCSHARP_TEST_FRAMEWORK=netcoreapp9 -DSWIG_EXECUTABLE=$(ls $(pwd)/usr/lib/python3.*/site-packages/swig/data/bin/swig) -DSWIG_DIR=$(dirname $(ls $(pwd)/usr/lib/python3.*/site-packages/swig/data/share/swig/4.0.2/swig.swg)) -DDotNetStandard_EXECUTABLE=${{env.DOTNET_ROOT}}/dotnet
- name: Build OSX and Windows
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: cmake --build build --config ${{matrix.buildtype}}
- name: Test OSX and Windows
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: cmake --build build --config ${{matrix.buildtype}} --target check
- name: Package OSX and Windows
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: cmake --build build --config ${{matrix.buildtype}} --target nupack
- name: Linux Build, Test and Package in Docker
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: docker run --rm -v ${{github.workspace}}/:/io ezralanglois/interop bash -c "cmake /io -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DPACKAGE_OUTPUT_FILE_PREFIX=/io/dist -DENABLE_SWIG=ON -DENABLE_PORTABLE=ON -DENABLE_EXAMPLES=OFF -DENABLE_CSHARP=ON -DENABLE_PYTHON=OFF && cmake --build build && cmake --build build --target check && cmake --build build --target nupack"
- name: Test Artifacts
run: ls dist/*
- uses: actions/upload-artifact@v4
if: matrix.buildtype == 'Release'
with:
name: artifact_${{matrix.os}}
path: dist/illumina*.*
publish:
needs: [build]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Publish Artifacts to Github Releases
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: fnkr/github-action-ghr@v1
env:
GHR_PATH: dist/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}