Skip to content

Issue 176 alt

Issue 176 alt #140

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
WX_WIDGETS_VERSION: 3.2.2.1
jobs:
build_and_test:
strategy:
matrix:
wx_version: [ libwxgtk3.0-gtk3-dev, libwxgtk3.2unofficial-dev ]
name: Build and Test
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Conditionally Add wxWidgets Unofficial Repo
if: contains(matrix.wx_version, 'unofficial')
run: |
sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
sudo apt-add-repository 'deb https://repos.codelite.org/wx${{ env.WX_WIDGETS_VERSION }}/ubuntu/ jammy universe'
- name: Update Package Info
run: |
sudo apt-get update
- name: Install Dependencies
run: >
sudo apt-get install
autoconf-archive
libgtk-3-dev
${{ matrix.wx_version }}
libnotify-dev
- name: Build Logo
run: |
autoreconf --install
./configure --enable-objects --enable-gitid --disable-docs
make
- name: Run Tests
timeout-minutes: 2
env:
LOGOLIB: ${{ github.workspace }}/logolib
working-directory: tests
run: >
xvfb-run
-e /dev/stdout
--auto-servernum
$GITHUB_WORKSPACE/ucblogo UnitTests.lg
-
-f $GITHUB_WORKSPACE/logo-unit-test-results.txt
-x
- name: Grade Tests
# Add an error annotation to the job for each test that failed or had an error.
# Fail the step (and job) if any tests failed or had an error.
run: |
awk '/\.\.\./ && ! /Ok$/{print "::error::"$0}' logo-unit-test-results.txt
awk "/\.\.\./ && ! /Ok$/{exit 1}" logo-unit-test-results.txt
- name: Archive Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: Logo Unit Test Results
path: logo-unit-test-results.txt