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

Commit

Permalink
(PA-4644) Replace appveyor with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonaldseanp committed Feb 29, 2024
1 parent c73821a commit 1737250
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 60 deletions.
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=/leatherman/dest -j2 && \
{ [[ '${{ inputs.coveralls }}' == 'ON' ]] && coveralls --gcov-options '\-lp' -r . -b . -e src -e vendor >/dev/null || true; }
31 changes: 31 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,31 @@
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: |
Set-Alias Get-BinRoot Get-ToolsLocation
choco install -y mingw -Version 13.2.0
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:\Program Files\gettext-iconv;$env:PATH"
cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE="C:\tools\pl-build-tools\pl-build-toolchain.cmake" -DCMAKE_INSTALL_PREFIX=C:\tools\leatherman -DBOOST_STATIC=ON -DLEATHERMAN_SHARED="$env:shared" ${{ 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
10 changes: 3 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,22 @@ jobs:
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"
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
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 }}
- 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 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
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.

0 comments on commit 1737250

Please sign in to comment.