From fca20568e48ba5588ccd18963e0a3c560ef8039d Mon Sep 17 00:00:00 2001 From: Matt Jakeman <12368711+mjakeman@users.noreply.github.com> Date: Fri, 22 Oct 2021 05:07:10 +1300 Subject: [PATCH] Add Continuous Integration (#1) Builds the project and runs (currently non-existent) tests Documentation/Introspection are disabled for now --- .github/workflows/main.yml | 44 ++++++++++++++++++++++++++++++++++++++ itex2mml/meson.build | 8 +++---- 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..48fde874 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,44 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + - uses: actions/setup-python@v1 + with: + python-version: '3.x' + - run: pip install meson ninja + - name: Install dependencies + run: sudo apt-get install -y libpango1.0-dev libxml2-dev + - run: meson setup _build + env: + CC: gcc + - name: Meson Build + run: meson compile -C _build + - name: Meson Test + run: meson test -C _build -v + - uses: actions/upload-artifact@v1 + if: failure() + with: + name: Linux_Meson_Testlog + path: _build/meson-logs/testlog.txt diff --git a/itex2mml/meson.build b/itex2mml/meson.build index 3612f98e..bc74e2f9 100644 --- a/itex2mml/meson.build +++ b/itex2mml/meson.build @@ -3,10 +3,10 @@ flex = find_program('flex', required : true) yyprefix = 'itex2MML_yy' -y_tab_c = custom_target('bison y.tab.c', - output : 'y.tab.c', +y_tab = custom_target('bison y.tab.c', + output : ['y.tab.c', 'y.tab.h'], input : 'itex2MML.y', - command : [bison, '-v', '-p', yyprefix, '-d', '@INPUT@', '-o', '@OUTPUT@']) + command : [bison, '-v', '-p', yyprefix, '--defines=@OUTPUT1@', '--output=@OUTPUT0@', '@INPUT@']) lex_yy_c = custom_target('flex lex.yy.c', output : 'lex.yy.c', @@ -15,7 +15,7 @@ lex_yy_c = custom_target('flex lex.yy.c', libitex2mml_sources = [ 'itex2MML.h', - y_tab_c, + y_tab, lex_yy_c ]