build_nix #3
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: build_nix | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: f-kretschmer/tmap | |
path: tmap | |
- name: get OGDF + TMAP binaries | |
run: | | |
wget -c https://github.com/f-kretschmer/tmap/releases/download/0.1/binaries-${{ runner.os }}.zip | |
unzip -o -j binaries-${{ runner.os }}.zip -d binaries | |
mkdir tmap/out | |
mv binaries/*tmap* tmap/out/ # TMAP library | |
mv binaries/* tmap/ogdf-conda/src/ # OGDF+COIN libraries | |
- name: create missing OGDF header file by running cmake | |
run: | | |
cd tmap/ogdf-conda/src | |
cmake -DBUILD_SHARED_LIBS=ON . | |
- name: build test | |
run: | | |
mkdir build | |
cd build | |
cmake .. | |
make | |
- name: test | |
run: | | |
cd build | |
LD_LIBRARY_PATH=../tmap/ogdf-conda/src ./LayoutFromEdgeList_test | |
- name: get dependencies | |
run: | | |
cd build | |
ldd *.so ||: | |
ldd *.dylib ||: | |
chmod +x ../install_utils/ldd_dependencies.sh | |
../install_utils/ldd_dependencies.sh | |
ls -ltrh dependencies | |
- name: make zip of binaries | |
run: | | |
zip -j tmapogdfwrapper-${{ runner.os }}.zip build/*Layout* | |
zip -j tmapogdfwrapper_with_dependencies-${{ runner.os }}.zip build/*Layout* build/dependencies/* | |
- uses: softprops/action-gh-release@v1 | |
with: | |
files: "*.zip" | |
tag_name: "0.1" | |
- name: Debug with tmate on failure | |
if: ${{ failure()}} | |
uses: mxschmitt/action-tmate@v3 |