Skip to content

Build Linux

Build Linux #30

Workflow file for this run

name: Build Linux
# Controls when the action will run.
on:
release:
types: [created]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- run: mkdir packages
- uses: actions/checkout@v2
- name: Get nuget packages
uses: nuget/setup-nuget@v1
with:
nuget-version: '5.x'
- run: pwd
- run: ls -l
- name: Install nuget packages
run: |
nuget install DHI.MikeCore.Linux.rhel7 -Version 20.0.0 -OutputDirectory packages
- run: mkdir -p mikecore/bin/linux
- run: pwd
- run: ls -l
- run: cp -r packages/DHI.MikeCore.Linux.rhel7.20.0.0/runtimes/linux-x64/native/* mikecore/bin/linux
- run: sudo apt-get install patchelf
- run: |
patchelf --set-rpath '$ORIGIN' mikecore/bin/linux/libufs.so
patchelf --set-rpath '$ORIGIN' mikecore/bin/linux/libeum.so
patchelf --set-rpath '$ORIGIN' mikecore/bin/linux/libMzCart.so
patchelf --set-rpath '$ORIGIN' mikecore/bin/linux/libpfs2004.so
patchelf --set-rpath '$ORIGIN' mikecore/bin/linux/libxerces-c-3.1.so
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest wheel twine
- name: Install mikecore-python
run: pip install .
- name: Test with pytest
run: pytest
- name: Build python package
run: python setup.py bdist_wheel --universal
- name: Upload python package
uses: actions/upload-artifact@v2.2.3
with:
name: mikecore
path: dist
# - name: Publish to pypi
# env:
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: |
# twine upload --skip-existing dist/*