Skip to content

- ensure we dont use the default expat postfixes #29

- ensure we dont use the default expat postfixes

- ensure we dont use the default expat postfixes #29

Workflow file for this run

name: Build Artifacts
on:
push:
branches: [ master ]
pull_request:
release:
types:
- published
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
strategy:
fail-fast: false
matrix:
static_runtime: ["ON", "OFF"]
arch: ["x86", "x64"]
build_type: ["Release", "Debug"]
runs-on: windows-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Optional, use if you use setuptools_scm
submodules: true # Optional, use if you have submodules
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Get Current Version
shell: bash
run: |
export VERSION=`cat VERSION.txt | tr -dc '[:print:]'`
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Version is: $VERSION"
- name: Remove additional xerces build steps
shell: bash
run: |
echo "" > xerces-c/doc/CMakeLists.txt
echo "" > xerces-c/tests/CMakeLists.txt
echo "" > xerces-c/samples/CMakeLists.txt
- name: Configure CMake
shell: cmd
working-directory: ${{runner.workspace}}/build
run: cmake -G "Ninja" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\instdir -DWITH_LIBXML=ON -DWITH_XERCES=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DEXPAT_MSVC_STATIC_CRT=${{matrix.static_runtime}} -DWITH_STATIC_RUNTIME=${{matrix.static_runtime}} %GITHUB_WORKSPACE%
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config ${{matrix.build_type}}
- name: Install
working-directory: ${{runner.workspace}}/build
shell: bash
run: |
cmake --install . --config ${{matrix.build_type}}
rm -f ${{runner.workspace}}/libSBML-dependencies/instdir/bin/*
- name: Upload
if: matrix.static_runtime == 'ON'
uses: actions/upload-artifact@v2
with:
path: instdir/*
name: libSBML-dependencies-${{ env.VERSION }}-${{ matrix.arch }}-${{ matrix.build_type }}-static
- name: Upload
if: matrix.static_runtime == 'OFF'
uses: actions/upload-artifact@v2
with:
path: instdir/*
name: libSBML-dependencies-${{ env.VERSION }}-${{ matrix.arch }}-${{ matrix.build_type }}
release:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Current Version
shell: bash
run: |
export VERSION=`cat VERSION.txt | tr -dc '[:print:]'`
echo "VERSION=$VERSION" >> $GITHUB_ENV
- uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
- name: Zip all artifacts again
shell: bash
run: |
for d in ./libSBML-dependencies-*/ ; do zip -qr "${d::-1}.zip" "$d"; done
ls *.zip
- name: Upload binaries to tagged release
if: github.repository == 'sbmlteam/libSBML-dependencies' && github.event_name == 'release' && github.event.action == 'published'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: libSBML-dependencies-*.zip
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Update Latest Release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: latest
name: 'Latest LibSBML dependencies'
prerelease: true
body: 'Latest build of the libSBML Dependencies'
files: |
./*.zip