-
Notifications
You must be signed in to change notification settings - Fork 488
79 lines (70 loc) · 2.67 KB
/
chart-tests.yml
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
71
72
73
74
75
76
77
78
79
name: "Test: chart"
on:
push:
branches:
- master
workflow_dispatch:
# nothing
jobs:
chart-tests:
runs-on: ubuntu-latest
# runs-on: [self-hosted, linux]
strategy:
matrix:
mode: ["release"]
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
repository: omnetpp/omnetpp
path: omnetpp
ref: omnetpp-6.x
- uses: actions/checkout@v4
with:
path: inet
- run: mkdir -p /home/runner/work/ccache
- uses: actions/cache/restore@v4
with:
path: /home/runner/work/ccache
key: native-${{ matrix.mode }}-ccache-${{ github.run_id }}
# See: https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
restore-keys: native-${{ matrix.mode }}-ccache
- name: Build and test
env:
MODE: ${{ matrix.mode }}
run: |
echo "::group::Installing packages"
sudo apt update
sudo apt install -y --no-install-recommends git wget curl ca-certificates python3 \
make ccache clang lld gdb bison flex perl doxygen graphviz libxml2-dev zlib1g-dev \
libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libz3-dev libopenscenegraph-dev
echo "::endgroup::"
source $GITHUB_WORKSPACE/inet/_scripts/github/build-omnetpp.sh
echo "::group::Installing pip"
sudo apt install -y python3-pip
echo "::endgroup::"
echo "::group::Installing Python packages"
python3 -m venv $GITHUB_WORKSPACE/venv
source $GITHUB_WORKSPACE/venv/bin/activate
python3 -m pip install --upgrade matplotlib numpy pandas seaborn scipy ipython posix-ipc cppyy sewar dask distributed optimparallel requests
echo "::endgroup::"
source $GITHUB_WORKSPACE/inet/_scripts/github/build-inet.sh
echo "::group::Reclaiming some disk space"
rm -rf $GITHUB_WORKSPACE/omnetpp/out
rm -rf $GITHUB_WORKSPACE/inet/out
ccache -cCz
echo "::endgroup::"
echo "::group::Cloning inet media repository"
git clone https://github.com/inet-framework/media.git
echo "::endgroup::"
echo "::group::Running chart tests"
inet_run_chart_tests -m release -f showcases
echo "::endgroup::"
- uses: actions/upload-artifact@v4
if: always() # even if the test failed, of course
with:
name: chart-test-results
path: |
${{ github.workspace }}/inet/media/**/*-new.png
${{ github.workspace }}/inet/media/**/*-diff.png
if-no-files-found: ignore