Skip to content

Set version to 0.21.0 #19

Set version to 0.21.0

Set version to 0.21.0 #19

Workflow file for this run

name: CI
on:
push:
# Don't run this workflow when a tag is pushed.
branches:
- '*'
pull_request:
env:
MSVC_CONFIG: RelWithDebInfo
jobs:
linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get descriptive version
id: get-version
shell: bash
run: |
GIT_DESCRIBE=$(git describe --tags --long --abbrev=7)
DESC_REF=${GIT_DESCRIBE}_${GITHUB_REF#refs/*/}
SAFE_DESC_REF=${DESC_REF//[\/<>\"|]/_}
echo "version=$SAFE_DESC_REF" >> $GITHUB_OUTPUT
- name: Install APT package dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-upgrade \
g++-8 \
libhttp-parser-dev \
libssh2-1-dev
- name: Run CMake
run: |
mkdir build
cd build
export CXX="g++-8" CC="gcc-8"
cmake .. -DCPACK_PACKAGE_VERSION="${{ steps.get-version.outputs.version }}"
make all
- name: Build archive
id: build-archive
shell: bash
run: |
cd build
cpack
VERSION="${{ steps.get-version.outputs.version }}"
echo "filename=metadata-validator-${VERSION}-Linux.tar.xz" >> $GITHUB_OUTPUT
- name: Upload archive
uses: actions/upload-artifact@v3
with:
name: ${{ steps.build-archive.outputs.filename }}
path: build/package/${{ steps.build-archive.outputs.filename }}
if: github.event_name == 'push'
windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get descriptive version
id: get-version
shell: bash
run: |
GIT_DESCRIBE=$(git describe --tags --long --abbrev=7)
DESC_REF=${GIT_DESCRIBE}_${GITHUB_REF#refs/*/}
SAFE_DESC_REF=${DESC_REF//[\/<>\"|]/_}
echo "version=$SAFE_DESC_REF" >> $GITHUB_OUTPUT
- name: Run CMake
run: |
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -A Win32 -DCPACK_PACKAGE_VERSION="${{ steps.get-version.outputs.version }}"
cmake --build . --config ${{ env.MSVC_CONFIG }}
- name: Build archive
id: build-archive
shell: bash
run: |
cd build
cpack -C ${{ env.MSVC_CONFIG }}
VERSION="${{ steps.get-version.outputs.version }}"
echo "filename=metadata-validator-${VERSION}-win32.7z" >> $GITHUB_OUTPUT
- name: Upload archive
uses: actions/upload-artifact@v3
with:
name: ${{ steps.build-archive.outputs.filename }}
path: build/package/${{ steps.build-archive.outputs.filename }}
if: github.event_name == 'push'