This repository has been archived by the owner on Jan 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #335 from AriaXLi/pa-4562_gh_actions
(PA-4562) Switch from travis to github actions for leatherman
- Loading branch information
Showing
4 changed files
with
106 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: docker_pull_and_make | ||
|
||
inputs: | ||
pkg_suffix: | ||
description: leatherman package suffix | ||
type: string | ||
cmake_extra_vars: | ||
description: extra vars for cmake | ||
type: string | ||
make_command: | ||
description: make command | ||
type: string | ||
coveralls: | ||
description: on or off | ||
type: string | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: pull docker image | ||
shell: bash | ||
run: docker pull gcr.io/cpp-projects/cpp-ci:1 | ||
- name: run make | ||
shell: bash | ||
run: | | ||
docker run -v `pwd`:/leatherman gcr.io/cpp-projects/cpp-ci:1 /bin/bash -c " | ||
cd /leatherman && | ||
rm locales/leatherman.pot && | ||
cmake ${{ matrix.options.cmake_extra_vars }} . && | ||
mkdir dest && | ||
make ${{ matrix.options.make_command }} DESTDIR=/leatherman/dest -j2 && | ||
{ [[ '${{ matrix.options.coveralls }}' == 'ON' ]] && coveralls --gcov-options '\-lp' -r . -b . -e src -e vendor >/dev/null || true; } | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: CI Checks | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
ci_checks: | ||
strategy: | ||
matrix: | ||
options: | ||
- make_command: cpplint | ||
- make_command: cppcheck | ||
- make_command: all test install ARGS=-v | ||
cmake_extra_vars: -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=ON | ||
coveralls: ON | ||
- make_command: all test install ARGS=-v | ||
cmake_extra_vars: -DLEATHERMAN_USE_LOCALES=OFF | ||
- make_command: all test install ARGS=-v | ||
cmake_extra_vars: -DLEATHERMAN_GETTEXT=OFF | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout current pr | ||
uses: actions/checkout@v3 | ||
- name: docker pull and make | ||
uses: ./.github/actions/docker_pull_and_make | ||
with: | ||
cmake_extra_vars: ${{ matrix.options.cmake_extra_vars }} | ||
make_command: ${{ matrix.options.make_command }} | ||
coveralls: ${{ matrix.options.coveralls }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Release Jobs | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
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" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout current pr | ||
uses: actions/checkout@v3 | ||
- name: docker pull and make | ||
uses: ./.github/actions/docker_pull_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` | ||
- 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 |
This file was deleted.
Oops, something went wrong.