Test: feature #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Test: feature" | |
on: | |
schedule: | |
# https://crontab.guru/#0_16_*_*_6 | |
- cron: "0 16 * * 6" # “At 16:00 on Saturday.” | |
workflow_dispatch: | |
# nothing | |
jobs: | |
feature-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
mode: ["release"] | |
# we could go all the way up to 20 even | |
split: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | |
total: [16] # keep these in sync! | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: omnetpp/omnetpp | |
path: omnetpp | |
- 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 \ | |
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 python3 | |
echo "::endgroup::" | |
source $GITHUB_WORKSPACE/inet/_scripts/github/build-omnetpp.sh | |
echo "::group::Running inet setenv" | |
cd $GITHUB_WORKSPACE/inet | |
. setenv -f | |
echo "::endgroup::" | |
echo "::group::Running feature tests" | |
export SPLIT_TOTAL=${{ matrix.total }} | |
export SPLIT_INDEX=${{ matrix.split }} | |
cd $GITHUB_WORKSPACE/inet/tests/features | |
# this indirectly calls the script named simply "inet", which handles the MODE envvar internally | |
./featuretest | |
echo "::endgroup::" | |
- uses: actions/upload-artifact@v4 | |
if: always() # even if the test failed, of course | |
with: | |
name: log-${{ matrix.split }} | |
path: ${{ github.workspace }}/inet/tests/features/_log |