-
Notifications
You must be signed in to change notification settings - Fork 34
70 lines (66 loc) · 1.96 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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@v4
with:
name: Logo Unit Test Results with ${{ matrix.wx_version }}
path: logo-unit-test-results.txt