Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ jobs:
- name: Compile wrapper on Linux / macOS
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
run: |
mkdir tmp-build
cd tmp-build
cmake $GITHUB_WORKSPACE/pythonfmu3/pythonfmu-export -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
cd ..
docker build -f DockerFile -t pythonfmu3-wrapper --target build .

- name: Create container and copy out artifact
if : startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
run: |
docker create --name extract pythonfmu3-wrapper
docker cp extract:/io/pythonfmu3/resources $GITHUB_WORKSPACE/pythonfmu3
docker rm extract

- name: Archive wrapper library
uses: actions/upload-artifact@v4
Expand Down
20 changes: 20 additions & 0 deletions DockerFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM quay.io/pypa/manylinux_2_28_x86_64 AS build

RUN yum install -y \
cmake \
gcc \
gcc-c++ \
make \
git \
python3 \
python3-pip \
python3-devel

WORKDIR /io

COPY . .

WORKDIR /io/tmp-build

RUN cmake /io/pythonfmu3/pythonfmu-export -DCMAKE_BUILD_TYPE=Release \
&& cmake --build . --config Release
2 changes: 1 addition & 1 deletion pythonfmu3/pythonfmu-export/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

# Force to use stable Python ABI https://docs.python.org/3/c-api/stable.html
add_compile_definitions(Py_LIMITED_API)
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
if (WIN32)
set(Python3_LIBRARIES ${Python3_LIBRARY_DIRS}/python3.lib)
endif ()
Expand Down