build #15
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 | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
# - uses: actions/checkout@v4 | |
# with: | |
# repository: ogdf/ogdf | |
# path: ogdf | |
- uses: actions/checkout@v4 | |
with: | |
repository: f-kretschmer/tmap | |
path: tmap | |
- name: setup msys2 | |
uses: msys2/setup-msys2@v2 | |
if: ${{ matrix.os == 'windows-latest' }} | |
with: | |
update: true | |
install: >- | |
base-devel | |
mingw-w64-x86_64-toolchain | |
mingw-w64-x86_64-cmake | |
git | |
zip | |
- name: get OGDF + TMAP binaries | |
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} | |
run: | | |
wget https://github.com/f-kretschmer/tmap/releases/download/0.1/binaries-${{ runner.os }}.zip | |
unzip -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: get OGDF + TMAP binaries (windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
shell: msys2 {0} | |
run: | | |
wget https://github.com/f-kretschmer/tmap/releases/download/0.1/binaries-${{ runner.os }}.zip | |
unzip -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 | |
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} | |
run: | | |
cd tmap/ogdf-conda/src | |
cmake -DBUILD_SHARED_LIBS=ON . | |
- name: create missing OGDF header file by running cmake (windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
shell: msys2 {0} | |
run: | | |
cd tmap/ogdf-conda/src | |
cmake -DBUILD_SHARED_LIBS=ON -G "Visual Studio 17 2022" -A x64 -T ClangCL . | |
- name: build test | |
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} | |
run: | | |
mkdir build | |
cd build | |
cmake .. | |
make | |
- name: build test (windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
shell: msys2 {0} | |
run: | | |
mkdir build | |
cd build | |
cmake -G "MSYS Makefiles" .. | |
make | |
- name: test | |
run: | | |
cd build | |
./ogdf_test | |
ldd *.so ||: | |
ldd *.dylib ||: | |
- name: make zip of binaries | |
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} | |
run: | | |
zip -j tmapogdfwrapper-${{ runner.os }}.zip build/*Layout* | |
- name: make zip of binaries | |
if: ${{ matrix.os == 'windows-latest' }} | |
shell: msys2 {0} | |
run: | | |
zip -j tmapogdfwrapper-${{ runner.os }}.zip build/*Layout* | |
- 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 |