Ensure that libdl is listed as a dependency of fmilib::shared #626
Workflow file for this run
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: libcosim CI without Conan | |
# This workflow is triggered on pushes to the repository. | |
on: [push] | |
jobs: | |
cmake-on-linux: | |
name: CMake | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# Note: The all-caps prefixes are part of CMake variable names, and | |
# therefore must be written exactly as they are. They're included here | |
# to make the build matrix easier to understand when viewed in the | |
# GitHub web interface. | |
build_type: [BUILD_TYPE=Debug, BUILD_TYPE=Release] | |
shared_libs: [SHARED_LIBS=ON, SHARED_LIBS=OFF] | |
timeout-minutes: 35 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Generate Dockerfile | |
run: | | |
mkdir /tmp/osp-builder-docker | |
cat <<EOF >/tmp/osp-builder-docker/Dockerfile | |
FROM debian:bookworm | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
cmake \ | |
build-essential \ | |
doxygen \ | |
wget \ | |
libboost-all-dev \ | |
libmsgsl-dev \ | |
libyaml-cpp-dev \ | |
libxerces-c-dev \ | |
libzip-dev zipcmp zipmerge ziptool | |
RUN wget \ | |
--no-check-certificate \ | |
"https://github.com/viproma/debian-fmilib/releases/download/debian%2F2.0.3-1/libfmilib2_2.0.3-1_amd64.deb" \ | |
"https://github.com/viproma/debian-fmilib/releases/download/debian%2F2.0.3-1/libfmilib2-dev_2.0.3-1_amd64.deb" | |
RUN dpkg -i libfmilib2_2.0.3-1_amd64.deb libfmilib2-dev_2.0.3-1_amd64.deb | |
COPY entrypoint.sh / | |
ENTRYPOINT /entrypoint.sh | |
EOF | |
- name: Generate entrypoint.sh | |
run: | | |
cat <<'EOF' >/tmp/osp-builder-docker/entrypoint.sh | |
#!/bin/bash | |
mkdir build | |
cd build | |
cmake -DCMAKE_${{ matrix.build_type }} -DBUILD_${{ matrix.shared_libs }} /mnt/source | |
cmake --build . | |
ctest --output-on-failure | |
EOF | |
chmod 0755 /tmp/osp-builder-docker/entrypoint.sh | |
- name: Build Docker image | |
run: docker build -t osp-builder /tmp/osp-builder-docker/ | |
- name: Build cosim | |
run: docker run --rm -v $(pwd):/mnt/source:ro osp-builder |