Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

(PA-4644) Replace appveyor with github actions #348

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/actions/run_cmake_and_make/action.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: run_cmake_and_make

inputs:
pkg_suffix:
description: leatherman package suffix
type: string
cmake_extra_vars:
description: extra vars for cmake
type: string
Expand All @@ -25,7 +22,7 @@ runs:
shell: bash
run: |
rm locales/leatherman.pot && \
cmake ${{ matrix.options.cmake_extra_vars }} . && \
mkdir dest && \
make ${{ matrix.options.make_command }} DESTDIR=./dest -j2 && \
{ [[ '${{ matrix.options.coveralls }}' == 'ON' ]] && coveralls --gcov-options '\-lp' -r . -b . -e src -e vendor >/dev/null || true; }
cmake ${{ inputs.cmake_extra_vars }} . && \
mkdir -p /tmp/leatherman/dest && \
make ${{ inputs.make_command }} DESTDIR=/tmp/leatherman/dest -j2 && \
{ [[ '${{ inputs.coveralls }}' == 'ON' ]] && coveralls --gcov-options '\-lp' -r . -b . -e src -e vendor >/dev/null || true; }
33 changes: 33 additions & 0 deletions .github/actions/run_win_cmake_and_make/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: run_win_cmake_and_make

inputs:
cmake_extra_vars:
description: extra vars for cmake
type: string

runs:
using: "composite"
steps:
- name: install the required tools
shell: pwsh
run: |
mkdir C:\tools\pl-build-tools\bin
Write-Output "Get-ToolsLocation `$args" | Out-File C:\tools\pl-build-tools\bin\Get-BinRoot.ps1
$env:PATH="C:\tools\pl-build-tools\bin;$env:PATH"
choco install -y mingw-w64 -Version 5.2.0 -source https://www.myget.org/F/puppetlabs
choco install -y cmake -Version 3.2.2 -source https://www.myget.org/F/puppetlabs
choco install -y gettext -Version 0.19.6 -source https://www.myget.org/F/puppetlabs
choco install -y pl-toolchain-x64 -Version 2015.12.01.1 -source https://www.myget.org/F/puppetlabs
choco install -y pl-boost-x64 -Version 1.58.0.2 -source https://www.myget.org/F/puppetlabs
choco install -y pl-openssl-x64 -Version 1.0.24.1 -source https://www.myget.org/F/puppetlabs
choco install -y pl-curl-x64 -Version 7.46.0.1 -source https://www.myget.org/F/puppetlabs

- name: run make
shell: pwsh
run: |
$env:PATH = $env:PATH.Replace("Git\bin", "Git\cmd")
$env:PATH = $env:PATH.Replace("Git\usr\bin", "Git\cmd")
$env:PATH = "C:\Ruby21-x64\bin;C:\tools\mingw64\bin;C:\tools\pl-build-tools;C:\Program Files\gettext-iconv;$env:PATH"
cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE="C:\tools\pl-build-tools\pl-build-toolchain.cmake" -DCMAKE_PREFIX_PATH=C:/tools/pl-build-tools -DCMAKE_INSTALL_PREFIX=C:/tools/leatherman -DBOOST_STATIC=ON -DLEATHERMAN_SHARED=ON ${{ inputs.cmake_extra_vars }} .
mingw32-make -j2
ctest -V 2>&1 | %{ if ($_ -is [System.Management.Automation.ErrorRecord]) { $_ | c++filt } else { $_ } }
11 changes: 10 additions & 1 deletion .github/workflows/ci_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,18 @@ jobs:
steps:
- name: checkout current pr
uses: actions/checkout@v4
- name: run CMake and Make
- name: run CMake and Make on Linux
uses: ./.github/actions/run_cmake_and_make
with:
cmake_extra_vars: ${{ matrix.options.cmake_extra_vars }}
make_command: ${{ matrix.options.make_command }}
coveralls: ${{ matrix.options.coveralls }}
win_ci_checks:
strategy:
fail-fast: false
runs-on: windows-latest
steps:
- name: checkout current pr
uses: actions/checkout@v4
- name: run CMake and Make on Windows
uses: ./.github/actions/run_win_cmake_and_make
38 changes: 22 additions & 16 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,36 @@ permissions:
contents: write

jobs:
release:
strategy:
matrix:
options:
- make_command: all test install ARGS=-v
cmake_extra_vars: -DBOOST_STATIC=ON
- make_command: all test install ARGS=-v
cmake_extra_vars: -DLEATHERMAN_SHARED=ON
pkg_suffix: "-dynamic"
release-unix:
runs-on: ubuntu-latest
steps:
- name: checkout current pr
uses: actions/checkout@v4
- name: docker pull and make
uses: ./.github/actions/docker_pull_and_make
- name: run CMake and Make on Linux
uses: ./.github/actions/run_cmake_and_make
with:
cmake_extra_vars: ${{ matrix.options.cmake_extra_vars }}
make_command: ${{ matrix.options.make_command }}
pkg_suffix: ${{ matrix.options.pkg_suffix }}
cmake_extra_vars: all test install ARGS=-v
make_command: -DLEATHERMAN_SHARED=ON
- name: build release artifact for tags
if: startsWith(github.ref, 'refs/tags/')
run: tar czvf leatherman${{ matrix.options.pkg_suffix }}.tar.gz `find dest -type f -print`
run: tar czvf leatherman-dynamic.tar.gz `find /tmp/leatherman/dest -type f -print`
- name: upload release artifacts for tag
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: leatherman${{ matrix.options.pkg_suffix }}.tar.gz
files: leatherman-dynamic.tar.gz
release-win:
runs-on: windows-latest
steps:
- name: checkout current pr
uses: actions/checkout@v4
- name: run CMake and Make on Windows
uses: ./.github/actions/run_win_cmake_and_make
- name: build release artifact for tags
if: startsWith(github.ref, 'refs/tags/')
run: 7z.exe a -t7z leatherman.7z C:\tools\leatherman\
- name: upload release artifacts for tag
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: leatherman.7z
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ This is a maintenance release to re-sync the code version with the tag, in order
- leatherman.dynamic\_library - cross-platform loading of dynamic libraries
- leatherman.execution - cross-platform system invocation with input/output support
- leatherman.file\_util - utilities for manipulating files, augmenting Boost.FileSystem
- leatherman.json\_container - a simplified C++ interface for rapidjson
- leatherman.json\_container - a simplified C++ interface for rapidjson
- leatherman.ruby - support for embedding and working with the Ruby interpreter
- leatherman.util - general C++ utilities
- strings, augmenting Boost.Algorithms
Expand Down
44 changes: 0 additions & 44 deletions appveyor.yml

This file was deleted.