Skip to content

ManyLinux 2014 build (#38) #278

ManyLinux 2014 build (#38)

ManyLinux 2014 build (#38) #278

Workflow file for this run

name: CI
on: [push]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
container: ${{ matrix.config.container }}
strategy:
matrix:
config:
- {
name: linux,
os: ubuntu-20.04,
container: 'quay.io/pypa/manylinux2014_x86_64',
artifact_name: libmath.so,
artifact_path: linux_64
}
- {
name: macos,
os: macos-11,
artifact_name: libmath.dylib,
artifact_path: osx_64
}
- {
name: windows,
os: windows-2019,
artifact_name: math.dll,
artifact_path: windows_64
}
steps:
# by default ubuntu 18.04 is shipped with cmake 3.10, to get a more recent version we get it from kitware repo
- name: Install pre-requisites
if: matrix.config.name == 'linux'
run: |
yum install -y wget
wget https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz -P /tmp
tar xf /tmp/apache-maven-*.tar.gz -C /opt
echo /opt/apache-maven-3.9.6/bin >> $GITHUB_PATH
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Checkout sources
uses: actions/checkout@v3
- name: Configure CMake
shell: bash
run: cmake -DCMAKE_BUILD_TYPE=Release -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build
- name: Build
shell: bash
run: cmake --build $GITHUB_WORKSPACE/build --parallel --config Release
- name: Test
shell: bash
run: mvn --batch-mode package
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.artifact_name }}
path: ${{ runner.workspace }}/powsybl-math-native/target/classes/natives/${{ matrix.config.artifact_path }}/${{ matrix.config.artifact_name }}
package:
name: Package libraries to JAR
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Download Linux library
uses: actions/download-artifact@v3
with:
name: libmath.so
path: target/classes/natives/linux_64/
- name: Download MacOS library
uses: actions/download-artifact@v3
with:
name: libmath.dylib
path: target/classes/natives/osx_64/
- name: Download Windows library
uses: actions/download-artifact@v3
with:
name: math.dll
path: target/classes/natives/windows_64/
- name: Build Jar
shell: bash
run: mvn -DskipTests install
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: powsybl-math-native.jar
path: target/*.jar