Skip to content

Version 1.1.5a1

Version 1.1.5a1 #84

Workflow file for this run

name: Linux Binaries
on:
workflow_dispatch:
push:
tags-ignore:
- '**'
branches:
- '**'
release:
types: ['released', 'prereleased']
jobs:
build:
runs-on: ubuntu-20.04
env:
HOST: 'x86_64-centos7-linux-gnu'
TOOLS_VERSION: '0.0.7'
TOOLS_URL: 'https://github.com/tttapa/cross-python/releases/download'
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Ninja
run: |
wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip
unzip ninja-linux.zip
sudo mv ninja /usr/bin
working-directory: /tmp
- name: Download toolchain
if: steps.cache-tools.outputs.cache-hit != 'true'
run: wget "${{ env.TOOLS_URL }}/${{ env.TOOLS_VERSION }}/full-${{ env.HOST }}.tar.xz" -O- | sudo tar xJ -C /opt
- name: Configure
run: |
host="${{ env.HOST }}"
staging="/opt/$host"
cmake -B package -S QPALM \
-G "Ninja Multi-Config" \
-D BUILD_SHARED_LIBS=On \
-DCMAKE_POSITION_INDEPENDENT_CODE=On \
-DQPALM_WITH_CXX=On \
-DQPALM_WITH_FORTRAN=On \
-D CMAKE_C_COMPILER="$staging/x-tools/$host/bin/$host-gcc" \
-D CMAKE_CXX_COMPILER="$staging/x-tools/$host/bin/$host-g++" \
-D CMAKE_Fortran_COMPILER="$staging/x-tools/$host/bin/$host-gfortran" \
-D CMAKE_FIND_ROOT_PATH="$staging/eigen"
env:
CXXFLAGS: "-march=skylake -static-libstdc++ -static-libgcc"
LDFLAGS: "-static-libstdc++ -static-libgcc"
CFLAGS: "-march=skylake -static-libgcc"
- name: Build Debug
run: |
cmake --build package --config Debug -j
- name: Build Release
run: |
cmake --build package --config RelWithDebInfo -j
- name: Package
run: |
cpack -C "Debug;RelWithDebInfo" \
-D CPACK_INSTALL_CMAKE_PROJECTS=".;QPALM;ALL;/;LADEL;LADEL;ALL;/"
working-directory: package
- name: Upload
uses: actions/upload-artifact@v3
with:
name: qpalm-linux
path: package/QPALM-*-Linux.tar.gz
test:
needs: [build]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Eigen
run: sudo VIRTUAL_ENV=/usr/local ./scripts/install-eigen.sh RelWithDebInfo
- name: Download
uses: actions/download-artifact@v3
with:
name: qpalm-linux
path: package
- name: Install
run: |
sudo tar xzf package/QPALM-*-Linux.tar.gz --strip-components 1 \
-C /usr/local
sudo ldconfig
- name: Build examples (Release)
run: |
cmake -B build-examples -S examples -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build-examples -j
- name: Run examples (Release)
run: |
./build-examples/c/qpalm_demo
./build-examples/cxx/qpalm_demo_cxx
./build-examples/fortran/qpalm_demo_fortran
- name: Build examples (Debug)
run: |
cmake -B build-examplesd -S examples -DCMAKE_BUILD_TYPE=Debug
cmake --build build-examplesd -j
- name: Run examples (Debug)
run: |
./build-examplesd/c/qpalm_demo
./build-examplesd/cxx/qpalm_demo_cxx
./build-examplesd/fortran/qpalm_demo_fortran
release:
if: ${{ github.event.action == 'released' || github.event.action == 'prereleased' }}
needs: [test]
runs-on: ubuntu-20.04
steps:
- name: Download
uses: actions/download-artifact@v3
with:
name: qpalm-linux
path: package
- name: Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
files: package/QPALM-*-Linux.tar.gz