build_nix #18
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-12, macos-14] | |
# NOTE: macos-12=x86, macos-14=ARM | |
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 }}-${{ runner.arch }}.zip | |
unzip -o -j binaries-${{ runner.os }}-${{ runner.arch }}.zip -d binaries | |
mkdir tmap/out | |
mv binaries/*tmap* tmap/out/ # TMAP library | |
mv binaries/* tmap/ogdf-conda/src/ # OGDF+COIN libraries | |
- name: install openMP for mac | |
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'macos-14' }} | |
run: brew install libomp | |
- 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 | |
chmod +x ../install_utils/ldd_dependencies.sh | |
../install_utils/ldd_dependencies.sh | |
ls -ltrh dependencies | |
# TODO: mac @rpath also for system dependencies like libc++, libomp etc. | |
# TODO: then we can also add libc++ (and libc++abi) to the zips, which is currently not found | |
# -> https://github.com/boecker-lab/coin-or-clp-java-api/blob/master/mac_utils/make_rpaths | |
- name: make zip of binaries | |
run: | | |
rm build/*test* | |
zip -j tmapogdfwrapper-${{ runner.os }}-${{ runner.arch }}.zip build/*Layout* | |
zip -j tmapogdfwrapper_with_dependencies-${{ runner.os }}-${{ runner.arch }}.zip build/*Layout* build/dependencies/* | |
- uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
tmapogdfwrapper-${{ runner.os }}-${{ runner.arch }}.zip | |
tmapogdfwrapper_with_dependencies-${{ runner.os }}-${{ runner.arch }}.zip | |
tag_name: "0.2" | |
- name: Debug with tmate on failure | |
if: ${{ failure()}} | |
uses: mxschmitt/action-tmate@v3 |