Skip to content

Commit

Permalink
Composable action: build Linux
Browse files Browse the repository at this point in the history
- Create a composable action for building the Linux package
- Create a new workflow - build-linux-artifact.yml. It utilizes the
  composable action
- Revert macos and windows workflows to be in the same file. Call the
  resusable Linux workflow as in import
  • Loading branch information
SimeonRolev committed Sep 25, 2024
1 parent ff5d317 commit a0acf73
Show file tree
Hide file tree
Showing 7 changed files with 442 additions and 502 deletions.
43 changes: 43 additions & 0 deletions .github/actions/build-linux/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 'Build Linux'
description: 'Build ths packages for Linux package'
runs:
using: "composite"
steps:
- name: Install prerequisites
shell: bash
run: |
sudo apt-get update -y
sudo apt-get install -y libboost-all-dev
sudo apt-get install -y libcurl4-openssl-dev
sudo apt-get install -y cmake
- name: Xerces-C - prepare
shell: bash
run: |
mkdir xerces-c
cd xerces-c
curl -o xerces-c.zip https://dlcdn.apache.org//xerces/c/3/sources/xerces-c-3.2.5.zip
unzip xerces-c.zip -d . && mv xerces-c-*/* .
# libMVRGdtf expects XMLChar be uint16_t
- name: Xerces-C - build
shell: bash
working-directory: xerces-c
run: |
./configure --disable-shared --enable-xmlch-uint16_t --prefix=$(pwd)/_build
make -j
make install
- name: libMVRGdtf - checkout repository
uses: actions/checkout@v4
with:
path: libMvrGdtf

- name: libMVRGdtf - build
shell: bash
working-directory: libMvrGdtf
run: |
mkdir build
cd build
cmake .. -DUNITTEST=TRUE -DEXTRA_LIBS="curl;icuuc;icudata;icui18n;icuio" -DXERCES_LIB_PATH="$(pwd)/../../xerces-c/_build/lib/libxerces-c.a"
make -j
29 changes: 29 additions & 0 deletions .github/workflows/build-linux-artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build Static Linux

on:
[workflow_call, workflow_dispatch]

jobs:
build_artifact:
runs-on: ubuntu-latest
name: Export a Linux build as an artifact
steps:
- uses: actions/checkout@v4 # https://github.com/nektos/act/issues/307
- name: Build
uses: ./.github/actions/build-linux

- name: Prepare Artifact
working-directory: libMvrGdtf
run: |
mkdir -p output/include
cp -r src/Include/* output/include/
mkdir -p output/lib
cp -r libs/* output/lib/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: libMVRgdtf-linux
path: |
libMvrGdtf/output
72 changes: 0 additions & 72 deletions .github/workflows/build-static-linux.yml

This file was deleted.

114 changes: 0 additions & 114 deletions .github/workflows/build-static-mac.yml

This file was deleted.

Loading

0 comments on commit a0acf73

Please sign in to comment.