Skip to content

Commit bf99d22

Browse files
committed
(PA-4644) Replace appveyor with github actions
1 parent c73821a commit bf99d22

File tree

6 files changed

+48
-60
lines changed

6 files changed

+48
-60
lines changed

.github/actions/run_cmake_and_make/action.yaml

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: run_cmake_and_make
22

33
inputs:
4-
pkg_suffix:
5-
description: leatherman package suffix
6-
type: string
74
cmake_extra_vars:
85
description: extra vars for cmake
96
type: string
@@ -25,7 +22,7 @@ runs:
2522
shell: bash
2623
run: |
2724
rm locales/leatherman.pot && \
28-
cmake ${{ matrix.options.cmake_extra_vars }} . && \
29-
mkdir dest && \
30-
make ${{ matrix.options.make_command }} DESTDIR=./dest -j2 && \
31-
{ [[ '${{ matrix.options.coveralls }}' == 'ON' ]] && coveralls --gcov-options '\-lp' -r . -b . -e src -e vendor >/dev/null || true; }
25+
cmake $INPUT_CMAKE_EXTRA_VARS . && \
26+
mkdir -p /leatherman/dest && \
27+
make $INPUT_MAKE_COMMAND DESTDIR=/leatherman/dest -j2 && \
28+
{ [[ "$INPUT_COVERALLS" == 'ON' ]] && coveralls --gcov-options '\-lp' -r . -b . -e src -e vendor >/dev/null || true; }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: run_win_cmake_and_make
2+
3+
inputs:
4+
cmake_extra_vars:
5+
description: extra vars for cmake
6+
type: string
7+
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: install the required tools
12+
shell: pwsh
13+
run: |
14+
choco install -y mingw-w64 -Version 5.2.0 -source https://www.myget.org/F/puppetlabs
15+
choco install -y cmake -Version 3.2.2 -source https://www.myget.org/F/puppetlabs
16+
choco install -y gettext -Version 0.19.6 -source https://www.myget.org/F/puppetlabs
17+
choco install -y pl-toolchain-x64 -Version 2015.12.01.1 -source https://www.myget.org/F/puppetlabs
18+
choco install -y pl-boost-x64 -Version 1.58.0.2 -source https://www.myget.org/F/puppetlabs
19+
choco install -y pl-openssl-x64 -Version 1.0.24.1 -source https://www.myget.org/F/puppetlabs
20+
choco install -y pl-curl-x64 -Version 7.46.0.1 -source https://www.myget.org/F/puppetlabs
21+
22+
- name: run make
23+
shell: pwsh
24+
run: |
25+
$env:PATH = $env:PATH.Replace("Git\bin", "Git\cmd")
26+
$env:PATH = $env:PATH.Replace("Git\usr\bin", "Git\cmd")
27+
SET PATH=C:\Ruby21-x64\bin;C:\tools\mingw64\bin;C:\Program Files\gettext-iconv;%PATH%
28+
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" $env:INPUT_CMAKE_EXTRA_VARS .
29+
mingw32-make -j2
30+
ctest -V 2>&1 | %{ if ($_ -is [System.Management.Automation.ErrorRecord]) { $_ | c++filt } else { $_ } }

.github/workflows/ci_checks.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,18 @@ jobs:
2929
steps:
3030
- name: checkout current pr
3131
uses: actions/checkout@v4
32-
- name: run CMake and Make
32+
- name: run CMake and Make on Linux
3333
uses: ./.github/actions/run_cmake_and_make
3434
with:
3535
cmake_extra_vars: ${{ matrix.options.cmake_extra_vars }}
3636
make_command: ${{ matrix.options.make_command }}
3737
coveralls: ${{ matrix.options.coveralls }}
38+
win_ci_checks:
39+
strategy:
40+
fail-fast: false
41+
runs-on: windows-latest
42+
steps:
43+
- name: checkout current pr
44+
uses: actions/checkout@v4
45+
- name: run CMake and Make on Windows
46+
uses: ./.github/actions/run_win_cmake_and_make

.github/workflows/release.yaml

+3-7
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,22 @@ jobs:
1313
strategy:
1414
matrix:
1515
options:
16-
- make_command: all test install ARGS=-v
17-
cmake_extra_vars: -DBOOST_STATIC=ON
1816
- make_command: all test install ARGS=-v
1917
cmake_extra_vars: -DLEATHERMAN_SHARED=ON
20-
pkg_suffix: "-dynamic"
2118
runs-on: ubuntu-latest
2219
steps:
2320
- name: checkout current pr
2421
uses: actions/checkout@v4
2522
- name: docker pull and make
26-
uses: ./.github/actions/docker_pull_and_make
23+
uses: ./.github/actions/run_cmake_and_make
2724
with:
2825
cmake_extra_vars: ${{ matrix.options.cmake_extra_vars }}
2926
make_command: ${{ matrix.options.make_command }}
30-
pkg_suffix: ${{ matrix.options.pkg_suffix }}
3127
- name: build release artifact for tags
3228
if: startsWith(github.ref, 'refs/tags/')
33-
run: tar czvf leatherman${{ matrix.options.pkg_suffix }}.tar.gz `find dest -type f -print`
29+
run: tar czvf leatherman-dynamic.tar.gz `find dest -type f -print`
3430
- name: upload release artifacts for tag
3531
uses: softprops/action-gh-release@v1
3632
if: startsWith(github.ref, 'refs/tags/')
3733
with:
38-
files: leatherman${{ matrix.options.pkg_suffix }}.tar.gz
34+
files: leatherman-dynamic.tar.gz

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ This is a maintenance release to re-sync the code version with the tag, in order
396396
- leatherman.dynamic\_library - cross-platform loading of dynamic libraries
397397
- leatherman.execution - cross-platform system invocation with input/output support
398398
- leatherman.file\_util - utilities for manipulating files, augmenting Boost.FileSystem
399-
- leatherman.json\_container - a simplified C++ interface for rapidjson
399+
- leatherman.json\_container - a simplified C++ interface for rapidjson
400400
- leatherman.ruby - support for embedding and working with the Ruby interpreter
401401
- leatherman.util - general C++ utilities
402402
- strings, augmenting Boost.Algorithms

appveyor.yml

-44
This file was deleted.

0 commit comments

Comments
 (0)