Skip to content

Commit 37ee30b

Browse files
committed
Linux build action
1 parent 87b1bac commit 37ee30b

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

.github/build_linux.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Build Linux
2+
3+
# Controls when the action will run.
4+
on:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# This workflow contains a single job called "build"
16+
build:
17+
# The type of runner that the job will run on
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
python-version: [3.9]
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
- uses: actions/checkout@v2
27+
- run: mkdir packages
28+
- uses: actions/checkout@v2
29+
- name: Get nuget packages
30+
uses: nuget/setup-nuget@v1
31+
with:
32+
nuget-version: '5.x'
33+
- run: pwd
34+
- run: ls -l
35+
- name: Install nuget packages
36+
run: |
37+
nuget install DHI.MikeCore.Linux.rhel7 -Version 19.0.0 -OutputDirectory packages
38+
- run: mkdir -p mikecore/bin/linux
39+
- run: pwd
40+
- run: ls -l
41+
- run: cp -r packages/DHI.MikeCore.Linux.rhel7.19.0.0/runtimes/linux-x64/native/* mikecore/bin/linux
42+
- run: sudo apt-get install patchelf
43+
- run: |
44+
patchelf --set-rpath '$ORIGIN' mikecore/bin/linux/libufs.so
45+
patchelf --set-rpath '$ORIGIN' mikecore/bin/linux/libeum.so
46+
patchelf --set-rpath '$ORIGIN' mikecore/bin/linux/libMzCart.so
47+
patchelf --set-rpath '$ORIGIN' mikecore/bin/linux/libpfs2004.so
48+
patchelf --set-rpath '$ORIGIN' mikecore/bin/linux/libxerces-c-3.1.so
49+
50+
51+
- name: Upload a Build Artifact
52+
uses: actions/upload-artifact@v2.2.3
53+
with:
54+
name: bin
55+
path: mikecore/bin
56+
57+
- name: Set up Python ${{ matrix.python-version }}
58+
uses: actions/setup-python@v2
59+
with:
60+
python-version: ${{ matrix.python-version }}
61+
- name: Install dependencies
62+
run: |
63+
python -m pip install --upgrade pip
64+
pip install pytest
65+
66+
- name: Install mikecore-python
67+
run: |
68+
pip install .
69+
- name: Test with pytest
70+
run: |
71+
pytest

0 commit comments

Comments
 (0)