Nightly #986
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: Nightly | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
NightlyWithTool: | |
name: ${{ matrix.name }} (${{ matrix.config }} ${{ matrix.options }} ${{ matrix.tool }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04] | |
config: [Debug, Release] | |
options: [Standard, Gargantua] | |
tool: [valgrind, gcov] | |
include: | |
- os: ubuntu-20.04 | |
name: Linux | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Checkout exploragram | |
uses: actions/checkout@v4 | |
with: | |
repository: BrunoLevy/exploragram | |
path: src/lib/exploragram | |
- name: Checkout data | |
uses: actions/checkout@v4 | |
with: | |
repository: BrunoLevy/geogram.data | |
path: tests/data | |
- name: Python3 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: RobotFramework | |
run: | | |
pip3 install robotframework | |
robot --version || true | |
################### Linux/MacOS ############################################### | |
- name: Dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install xorg-dev valgrind gcovr | |
- name: Configure (Linux/MacOS) | |
run: | | |
cp cmake/options/CMakeOptions.txt.${{matrix.options}} CMakeOptions.txt | |
./configure.sh --with-${{ matrix.tool }} | |
echo "platform="\ | |
`./configure.sh --show-platform`-${{ matrix.config }} >> $GITHUB_ENV | |
- name: Build (Linux/MacOS) | |
run: | | |
cd build/${{ env.platform }};\ | |
make -j2 2>&1 | tee ../../build_log.txt | |
- name: Tests (Linux/MacOs) | |
run: | | |
build/${{ env.platform }}/tests/runpybot.sh \ | |
--include=daily_valgrind --include=daily_valgrind_${{matrix.options}} \ | |
--with-${{ matrix.tool }} tests/ | |
##################################################################### | |
- name: Publish tests results as artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nightly-${{matrix.name}}-${{matrix.config}}-${{matrix.options}}-${{matrix.tool}} | |
if-no-files-found: ignore | |
path: | | |
report.html | |
log.html | |
run/**/*.memcheck | |
build_log.txt | |
coverage.* | |
TESTS_SUCCESS | |
- name: "Notify tests results" | |
uses: andstor/file-existence-action@v3 | |
with: | |
files: "TESTS_SUCCESS" | |
fail: true | |
############################################################################# | |
Reports: | |
runs-on: ubuntu-latest | |
if: always() | |
needs: NightlyWithTool | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Get artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Generate reports from artifacts | |
run: | | |
./tools/generate_reports.sh | |
- name: Publish reports on gh-pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./reports/nightly | |
destination_dir: reports/nightly | |
# force_orphan: true # to clean history of gh-pages branch |