Skip to content

Fix summary_id set to -1 for wheatsheaf mean outputs (#399) #287

Fix summary_id set to -1 for wheatsheaf mean outputs (#399)

Fix summary_id set to -1 for wheatsheaf mean outputs (#399) #287

Workflow file for this run

name: Ktools Build
on:
push:
workflow_dispatch:
inputs:
create_ktools_builder:
description: 'Rebuild the "coreoasis/ktools-builder:latest" image and push to docker hub, Options: [true, false]'
required: true
default: false
skip_cmake:
description: 'Skip the optional build with CMake step [true, false]'
required: false
type: string
# For reusable workflows
workflow_call:
inputs:
create_ktools_builder:
description: 'Rebuild the "coreoasis/ktools-builder:latest" image and push to docker hub, Options: [true, false]'
required: true
default: false
type: string
ktools_branch:
description: 'For Remote calls, override the ktools branch with value'
required: false
type: string
skip_cmake:
description: 'Skip the optional build with CMake step [true, false]'
required: false
type: string
env:
CREATE_KTOOLS_BUILDER: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.create_ktools_builder || 'false' }}"
IMAGE_KTOOLS_BUILDER: "coreoasis/ktools-builder"
TAG_KTOOLS_BUILDER: "latest"
KTOOLS_BRANCH: ${{ github.ref_name }}
SKIP_CMAKE: 'false'
jobs:
osx:
runs-on: macos-13
defaults:
run:
shell: bash
steps:
- name: Dump github context
run: echo "$GITHUB_CONTEXT"
shell: bash
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
- name: Set input - ktools_branch
if: inputs.ktools_branch != ''
run: echo "KTOOLS_BRANCH=${{ inputs.ktools_branch }}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
with:
repository: OasisLMF/ktools
ref: ${{ env.KTOOLS_BRANCH }}
- name: (MacOS) Install dependencies
run: |
ln -s /usr/bin/shasum5.18 /usr/local/bin/sha1sum
brew install \
autoconf \
automake \
libtool \
zlib-ng
- name: (MacOS) Build ktools x86
run: |
BIN_TARGET=$(pwd)/x86
./autogen.sh
./configure --enable-osx --enable-o3 --prefix=$BIN_TARGET
make check
make install
- name: Store ktest output
if: always()
uses: actions/upload-artifact@v4
with:
name: darwin_testout
path: ${{ github.workspace }}/ktest/testout
retention-days: 3
- name: Tarball bin files
run: |
cd ./x86/bin
tar -zcvf ${{ github.workspace }}/Darwin_x86_64.tar.gz ./
- name: 'Upload Ktool binaries - x86'
uses: actions/upload-artifact@v4
with:
name: Darwin_x86_64
path: Darwin_x86_64.tar.gz
retention-days: 5
linux:
runs-on: ubuntu-latest
steps:
- name: Dump github context
run: echo "$GITHUB_CONTEXT"
shell: bash
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
- name: Set input - ktools_branch
if: inputs.ktools_branch != ''
run: echo "KTOOLS_BRANCH=${{ inputs.ktools_branch }}" >> $GITHUB_ENV
- name: Set input - skip_cmake
if: inputs.skip_cmake == 'true'
run: echo "SKIP_CMAKE=true" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
with:
repository: OasisLMF/ktools
ref: ${{ env.KTOOLS_BRANCH }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: pull latest ktools builder
if: env.CREATE_KTOOLS_BUILDER == 'false'
run: |
docker pull ${{ env.IMAGE_KTOOLS_BUILDER }}:${{ env.TAG_KTOOLS_BUILDER }}
- name: Create new build image (optional)
if: env.CREATE_KTOOLS_BUILDER == 'true'
run: |
docker build -f build/Dockerfile.clang-build -t ${{ env.IMAGE_KTOOLS_BUILDER }}:${{ env.TAG_KTOOLS_BUILDER }} .
docker push ${{ env.IMAGE_KTOOLS_BUILDER }}:${{ env.TAG_KTOOLS_BUILDER }}
- name: Build with Cmake
if: env.SKIP_CMAKE == 'false'
working-directory: ${{ github.workspace }}
run: |
docker run --entrypoint build-cmake.sh -v $(pwd):/var/ktools ${{ env.IMAGE_KTOOLS_BUILDER }}:${{ env.TAG_KTOOLS_BUILDER }}
ls -la ./tar
- name: Build with Autotools
working-directory: ${{ github.workspace }}
run: |
docker run --entrypoint build-autotools.sh -v $(pwd):/var/ktools ${{ env.IMAGE_KTOOLS_BUILDER }}:${{ env.TAG_KTOOLS_BUILDER }}
ls -la ./tar
- name: Store ktest output
if: always()
uses: actions/upload-artifact@v4
with:
name: linux_testout
path: ${{ github.workspace }}/ktest/testout
retention-days: 3
- name: 'Store Linux build'
uses: actions/upload-artifact@v4
with:
name: Linux_x86_64
path: ./tar/Linux_x86_64.tar.gz
retention-days: 5