2022-09-18 21:55:03 +02:00
|
|
|
#
|
|
|
|
# boxes - Command line filter to draw/remove ASCII boxes around text
|
2023-03-26 21:32:08 +02:00
|
|
|
# Copyright (c) 1999-2023 Thomas Jensen and the boxes contributors
|
2022-09-18 21:55:03 +02:00
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
|
|
|
|
# License, version 3, as published by the Free Software Foundation.
|
|
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
|
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
|
|
# details.
|
|
|
|
# You should have received a copy of the GNU General Public License along with this program.
|
|
|
|
# If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
#____________________________________________________________________________________________________________________
|
|
|
|
#====================================================================================================================
|
|
|
|
|
2021-04-17 21:12:19 +02:00
|
|
|
name: build
|
|
|
|
|
2021-09-11 21:04:53 +02:00
|
|
|
on: [push, pull_request, workflow_dispatch]
|
2021-04-17 21:12:19 +02:00
|
|
|
|
2023-05-18 22:16:27 +02:00
|
|
|
env:
|
|
|
|
TERM: xterm-color
|
|
|
|
|
2021-04-17 21:12:19 +02:00
|
|
|
jobs:
|
2021-09-11 21:04:53 +02:00
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2023-11-26 18:34:21 +01:00
|
|
|
env:
|
|
|
|
LEX: flex
|
|
|
|
YACC: bison
|
2021-09-11 21:04:53 +02:00
|
|
|
steps:
|
2023-11-25 20:24:20 +01:00
|
|
|
- uses: actions/checkout@v4
|
2021-09-11 21:04:53 +02:00
|
|
|
|
|
|
|
- name: add-packages
|
|
|
|
run: |
|
|
|
|
sudo apt-get update -y
|
2023-05-08 21:12:00 +02:00
|
|
|
sudo apt-get install -y git flex bison libunistring-dev libpcre2-dev libncurses-dev diffutils vim-common lcov libcmocka-dev
|
2021-09-11 21:04:53 +02:00
|
|
|
|
|
|
|
- name: make cov
|
|
|
|
run: make cov
|
|
|
|
|
2021-10-20 22:28:34 +02:00
|
|
|
- name: Run white-box tests
|
|
|
|
run: make utest
|
|
|
|
|
|
|
|
- name: Run black-box tests
|
2021-09-11 21:04:53 +02:00
|
|
|
run: make covtest
|
|
|
|
|
|
|
|
- name: Coveralls
|
2023-04-29 14:58:00 +02:00
|
|
|
uses: coverallsapp/github-action@v2
|
2021-09-11 21:04:53 +02:00
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
2023-04-29 14:58:00 +02:00
|
|
|
file: out/lcov-total.info
|
|
|
|
format: lcov
|
2023-11-25 21:00:40 +01:00
|
|
|
flag-name: run-linux
|
|
|
|
parallel: true
|
2023-08-24 16:18:44 +02:00
|
|
|
|
2023-11-25 21:00:40 +01:00
|
|
|
build-macos:
|
2023-08-24 16:18:44 +02:00
|
|
|
runs-on: macos-latest
|
2023-08-30 15:07:18 +02:00
|
|
|
env:
|
|
|
|
LEX: /usr/local/opt/flex/bin/flex
|
|
|
|
YACC: /usr/local/opt/bison/bin/bison
|
2023-08-24 16:18:44 +02:00
|
|
|
steps:
|
2023-11-25 20:24:20 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-24 16:18:44 +02:00
|
|
|
|
2023-08-30 14:47:59 +02:00
|
|
|
# We need to use GNU grep, sed, and xargs on macOS
|
2023-08-24 16:18:44 +02:00
|
|
|
- name: add-packages
|
|
|
|
run: |
|
2023-08-30 14:47:59 +02:00
|
|
|
brew install flex bison diffutils lcov cmocka grep gnu-sed findutils
|
2023-08-30 14:31:34 +02:00
|
|
|
echo '/usr/local/opt/grep/libexec/gnubin' >> $GITHUB_PATH
|
2023-08-30 14:38:11 +02:00
|
|
|
echo '/usr/local/opt/gnu-sed/libexec/gnubin' >> $GITHUB_PATH
|
2023-08-30 14:47:59 +02:00
|
|
|
echo '/usr/local/opt/findutils/libexec/gnubin' >> $GITHUB_PATH
|
2023-08-24 16:18:44 +02:00
|
|
|
|
|
|
|
- name: make cov
|
2023-08-30 15:07:18 +02:00
|
|
|
run: make cov
|
2023-08-24 16:18:44 +02:00
|
|
|
|
2023-11-26 18:26:01 +01:00
|
|
|
- name: Run white-box tests
|
|
|
|
run: make utest
|
2023-08-24 16:18:44 +02:00
|
|
|
|
|
|
|
- name: Run black-box tests
|
2023-08-30 15:07:18 +02:00
|
|
|
run: make covtest
|
2023-08-24 16:18:44 +02:00
|
|
|
|
|
|
|
- name: Coveralls
|
|
|
|
uses: coverallsapp/github-action@v2
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: out/lcov-total.info
|
|
|
|
format: lcov
|
2023-11-25 21:00:40 +01:00
|
|
|
flag-name: run-macos
|
|
|
|
parallel: true
|
|
|
|
|
|
|
|
finish:
|
|
|
|
needs: [build, build-macos]
|
|
|
|
if: ${{ always() }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Coveralls Finished
|
|
|
|
uses: coverallsapp/github-action@v2
|
|
|
|
with:
|
|
|
|
parallel-finished: true
|
|
|
|
carryforward: "run-linux,run-macos"
|