Skip to content

Commit

Permalink
Updates to GitHub Actions
Browse files Browse the repository at this point in the history
* Drop scheduled CI (disables PR trigger from time to time)
* Update CI badge in README
* Add dispatch trigger
* Better yamllint conformance
* Update to latest action releases
  • Loading branch information
cottsay committed Feb 13, 2024
1 parent f5bcd0c commit cdd876d
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 24 deletions.
77 changes: 57 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: OpenELP CI

on:
on: # yamllint disable-line rule:truthy
workflow_dispatch:
pull_request:
push:
branches:
- devel
- main
- release/*
schedule:
- cron: 0 0 1 * *

jobs:
build_and_test:
Expand All @@ -28,20 +28,23 @@ jobs:
- os: windows-latest
test_target: RUN_TESTS
extra_flags: /WX
extra_compiler_flags: /experimental:external /external:anglebrackets /external:W0
extra_compiler_flags: >
/experimental:external
/external:anglebrackets
/external:W0
steps:
- name: Cache PCRE2
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{runner.workspace}}/build/pcre-prefix/src/pcre2-10.42.tar.gz
key: pcre2-10.42
- name: Clone project
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Get snapshot ID
id: get-snap-id
shell: bash
run: echo "::set-output name=snap_id::git${{github.sha}}" | cut -c-38
run: echo "snap_id=git${{github.sha}}" | cut -c-19 >> $GITHUB_OUTPUT
- name: Create build environment
shell: bash
working-directory: ${{runner.workspace}}
Expand All @@ -67,18 +70,37 @@ jobs:
-DCMAKE_SHARED_LINKER_FLAGS="${{matrix.extra_flags}}"
-DCMAKE_STATIC_LINKER_FLAGS="${{matrix.extra_flags}}"
- name: Build PCRE2
run: cmake --build ${{runner.workspace}}/build --config ${{matrix.build_type}} -j2 -t pcre
run: >
cmake
--build ${{runner.workspace}}/build
--config ${{matrix.build_type}}
-j2
-t pcre
- name: Build project
run: cmake --build ${{runner.workspace}}/build --config ${{matrix.build_type}} -j2
run: >
cmake
--build ${{runner.workspace}}/build
--config ${{matrix.build_type}}
-j2
- name: Test project
run: cmake --build ${{runner.workspace}}/build --config ${{matrix.build_type}} -j2 -t ${{matrix.test_target}}
run: >
cmake
--build ${{runner.workspace}}/build
--config ${{matrix.build_type}}
-j2
-t ${{matrix.test_target}}
if: ${{matrix.test_target}}
env:
CTEST_OUTPUT_ON_FAILURE: 1
- name: Package project
run: cmake --build ${{runner.workspace}}/build --config ${{matrix.build_type}} -j2 -t package
run: >
cmake
--build ${{runner.workspace}}/build
--config ${{matrix.build_type}}
-j2
-t package
- name: Upload package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: OpenELP-${{runner.os}}
path: ${{runner.workspace}}/build/_CPack_Packages/${{runner.os}}/ZIP/OpenELP-${{runner.os}}/*
Expand All @@ -91,7 +113,7 @@ jobs:
run: sudo apt-get install libclang-cpp9 libclang1-9 -y
- name: Cache Doxygen
id: cache-doxygen
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{runner.workspace}}/doxygen
key: doxygen-1.9.7
Expand All @@ -102,11 +124,13 @@ jobs:
wget -O - https://www.doxygen.nl/files/doxygen-1.9.7.linux.bin.tar.gz | tar -xz
mv doxygen-1.9.7 doxygen
- name: Clone project
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Create build environment
shell: bash
working-directory: ${{runner.workspace}}
run: mkdir -p build && echo "WARN_AS_ERROR = FAIL_ON_WARNINGS" >> ${{github.workspace}}/doc/Doxyfile.in
run: |
mkdir -p build
echo "WARN_AS_ERROR = FAIL_ON_WARNINGS" >> doc/Doxyfile.in
- name: Configure project
working-directory: ${{runner.workspace}}/build
run: >
Expand All @@ -122,9 +146,13 @@ jobs:
-DOPENELP_EXTRA_VERSION=${{steps.get-snap-id.outputs.snap_id}}
-DOPENELP_DOC_INTERNAL=ON
- name: Build documentation
run: cmake --build ${{runner.workspace}}/build -j2 -t doc
run: >
cmake
--build ${{runner.workspace}}/build
-j2
-t doc
- name: Upload documentation
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: OpenELP-HTML-Docs
path: ${{runner.workspace}}/build/doc/html/*
Expand All @@ -134,7 +162,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Clone project
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Create build environment
shell: bash
working-directory: ${{runner.workspace}}
Expand All @@ -151,9 +179,18 @@ jobs:
-DOPENELP_USE_OPENSSL:BOOL=OFF
-DCMAKE_C_FLAGS="--coverage"
- name: Build project
run: cmake --build ${{runner.workspace}}/build --config Debug -j2
run: >
cmake
--build ${{runner.workspace}}/build
--config Debug
-j2
- name: Test project
run: cmake --build ${{runner.workspace}}/build --config Debug -j2 -t test
run: >
cmake
--build ${{runner.workspace}}/build
--config Debug
-j2
-t test
env:
CTEST_OUTPUT_ON_FAILURE: 1
- name: Upload coverage
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:

steps:
- name: Cache PCRE2
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{runner.workspace}}\build\pcre-prefix\src\pcre2-10.42.tar.gz
key: pcre2-10.42
- name: Clone project
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Create build environment
shell: bash
working-directory: ${{runner.workspace}}
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Package project
run: cmake --build ${{runner.workspace}}\build --config Release -j2 -t package
- name: Upload package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: OpenELP-win64
path: ${{runner.workspace}}\build\OpenELP-*-win64.exe
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OpenELP also has the ability to bind to multiple network interfaces which are
routed to unique external IP addresses, and therefore is capable of accepting
connections from multiple clients simultaneously.

[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/cottsay/openelp/OpenELP%20CI/main?event=push&logo=github)](https://github.com/cottsay/openelp/actions?query=workflow%3A%22OpenELP+CI%22+branch%3Amain+event%3Apush) [![AUR version](https://img.shields.io/aur/version/openelp?logo=arch%20linux&&logoColor=ffffff)](https://aur.archlinux.org/packages/openelp/) [![EPEL package](https://img.shields.io/fedora/v/openelp/epel8?label=epel&logo=red%20hat)](https://src.fedoraproject.org/rpms/openelp) [![Fedora package](https://img.shields.io/fedora/v/openelp?logo=fedora)](https://src.fedoraproject.org/rpms/openelp) [![Codecov](https://img.shields.io/codecov/c/github/cottsay/openelp/main?logo=codecov&logoColor=ffffff)](https://app.codecov.io/gh/cottsay/openelp/branch/main)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/cottsay/openelp/ci.yaml?branch=main&event=push&logo=github)](https://github.com/cottsay/openelp/actions/workflows/ci.yaml?query=branch%3Amain+event%3Apush) [![AUR version](https://img.shields.io/aur/version/openelp?logo=arch%20linux&&logoColor=ffffff)](https://aur.archlinux.org/packages/openelp/) [![EPEL package](https://img.shields.io/fedora/v/openelp/epel8?label=epel&logo=red%20hat)](https://src.fedoraproject.org/rpms/openelp) [![Fedora package](https://img.shields.io/fedora/v/openelp?logo=fedora)](https://src.fedoraproject.org/rpms/openelp) [![Codecov](https://img.shields.io/codecov/c/github/cottsay/openelp/main?logo=codecov&logoColor=ffffff)](https://app.codecov.io/gh/cottsay/openelp/branch/main)

Prerequisites
-------------
Expand Down

0 comments on commit cdd876d

Please sign in to comment.