Skip to content

Commit 6a6112b

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

File tree

6 files changed

+70
-69
lines changed

6 files changed

+70
-69
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 ${{ inputs.cmake_extra_vars }} . && \
26+
mkdir -p /tmp/leatherman/dest && \
27+
make ${{ inputs.make_command }} DESTDIR=/tmp/leatherman/dest -j2 && \
28+
{ [[ '${{ inputs.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,33 @@
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+
mkdir C:\tools\pl-build-tools\bin
15+
Write-Output "Get-ToolsLocation `$args" | Out-File C:\tools\pl-build-tools\bin\Get-BinRoot.ps1
16+
$env:PATH="C:\tools\pl-build-tools\bin;$env:PATH"
17+
choco install -y mingw-w64 -Version 5.2.0 -source https://www.myget.org/F/puppetlabs
18+
choco install -y cmake -Version 3.2.2 -source https://www.myget.org/F/puppetlabs
19+
choco install -y gettext -Version 0.19.6 -source https://www.myget.org/F/puppetlabs
20+
choco install -y pl-toolchain-x64 -Version 2015.12.01.1 -source https://www.myget.org/F/puppetlabs
21+
choco install -y pl-boost-x64 -Version 1.58.0.2 -source https://www.myget.org/F/puppetlabs
22+
choco install -y pl-openssl-x64 -Version 1.0.24.1 -source https://www.myget.org/F/puppetlabs
23+
choco install -y pl-curl-x64 -Version 7.46.0.1 -source https://www.myget.org/F/puppetlabs
24+
25+
- name: run make
26+
shell: pwsh
27+
run: |
28+
$env:PATH = $env:PATH.Replace("Git\bin", "Git\cmd")
29+
$env:PATH = $env:PATH.Replace("Git\usr\bin", "Git\cmd")
30+
$env:PATH = "C:\Ruby21-x64\bin;C:\tools\mingw64\bin;C:\tools\pl-build-tools;C:\Program Files\gettext-iconv;$env:PATH"
31+
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 }} .
32+
mingw32-make -j2
33+
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

+22-16
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,36 @@ permissions:
99
contents: write
1010

1111
jobs:
12-
release:
13-
strategy:
14-
matrix:
15-
options:
16-
- make_command: all test install ARGS=-v
17-
cmake_extra_vars: -DBOOST_STATIC=ON
18-
- make_command: all test install ARGS=-v
19-
cmake_extra_vars: -DLEATHERMAN_SHARED=ON
20-
pkg_suffix: "-dynamic"
12+
release-unix:
2113
runs-on: ubuntu-latest
2214
steps:
2315
- name: checkout current pr
2416
uses: actions/checkout@v4
25-
- name: docker pull and make
26-
uses: ./.github/actions/docker_pull_and_make
17+
- name: run CMake and Make on Linux
18+
uses: ./.github/actions/run_cmake_and_make
2719
with:
28-
cmake_extra_vars: ${{ matrix.options.cmake_extra_vars }}
29-
make_command: ${{ matrix.options.make_command }}
30-
pkg_suffix: ${{ matrix.options.pkg_suffix }}
20+
cmake_extra_vars: all test install ARGS=-v
21+
make_command: -DLEATHERMAN_SHARED=ON
3122
- name: build release artifact for tags
3223
if: startsWith(github.ref, 'refs/tags/')
33-
run: tar czvf leatherman${{ matrix.options.pkg_suffix }}.tar.gz `find dest -type f -print`
24+
run: tar czvf leatherman-dynamic.tar.gz `find dest -type f -print`
3425
- name: upload release artifacts for tag
3526
uses: softprops/action-gh-release@v1
3627
if: startsWith(github.ref, 'refs/tags/')
3728
with:
38-
files: leatherman${{ matrix.options.pkg_suffix }}.tar.gz
29+
files: leatherman-dynamic.tar.gz
30+
release-win:
31+
runs-on: windows-latest
32+
steps:
33+
- name: checkout current pr
34+
uses: actions/checkout@v4
35+
- name: run CMake and Make on Windows
36+
uses: ./.github/actions/run_win_cmake_and_make
37+
- name: build release artifact for tags
38+
if: startsWith(github.ref, 'refs/tags/')
39+
run: 7z.exe a -t7z leatherman.7z C:\tools\leatherman\
40+
- name: upload release artifacts for tag
41+
uses: softprops/action-gh-release@v1
42+
if: startsWith(github.ref, 'refs/tags/')
43+
with:
44+
files: leatherman.7z

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)