Skip to content

Release/4.0.0

Release/4.0.0 #3933

Workflow file for this run

# This file is part of the DiscoPoP software (http://www.discopop.tu-darmstadt.de)
#
# Copyright (c) 2020, Technische Universitaet Darmstadt, Germany
#
# This software may be modified and distributed under the terms of
# the 3-Clause BSD License. See the LICENSE file in the package base
# directory for details.
name: "DiscoPoP CI"
on:
push:
branches:
- master
pull_request:
branches:
- '**'
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
execute_code_checks:
runs-on: ubuntu-20.04
name: Execute Code Checks
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: "Check all files for DiscoPoP License tag"
run: ./scripts/dev/check-license.sh $(find . -type f)
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # uses requirements.txt
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: "Run MyPy Type Checker - DiscoPoP Explorer"
run: python -m mypy --config-file=mypy.ini -p discopop_explorer
- name: "Run MyPy Type Checker - DiscoPoP Library"
run: python -m mypy --config-file=mypy.ini -p discopop_library
# - name: "Run MyPy Type Checker - DiscoPoP Profiler - DEPRECATED"
# run: python -m mypy --config-file=mypy.ini -p DEPRECATED_discopop_profiler
#
# - name: "Run MyPy Type Checker - DiscoPoP Wizard - DEPRECATED"
# run: python -m mypy --config-file=mypy.ini -p DEPRECATED_discopop_wizard
- name: "Check formatting of DiscoPoP Explorer"
run: python -m black -l 120 --check discopop_explorer
- name: "Check formatting of DiscoPoP Library"
run: python -m black -l 120 --check discopop_library
# - name: "Check formatting of DiscoPoP Profiler - DEPRECATED"
# run: python -m black -l 120 --check DEPRECATED_discopop_profiler
#
# - name: "Check formatting of DiscoPoP Wizard - DEPRECATED"
# run: python -m black -l 120 --check DEPRECATED_discopop_wizard
execute_cxx_unit_tests:
runs-on: ubuntu-20.04
name: Execute C++ unit tests
needs: execute_code_checks
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # uses requirements.txt
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Setup DiscoPoP Profiler - Install Dependencies
run: |
sudo apt-get update
sudo apt-get remove clang-8 clang-9 clang-10 clang-11 clang-12
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main"
sudo apt-get update
sudo apt-get install -y cmake libclang-11-dev clang-11 llvm-11
sudo ln -s /usr/bin/clang-11 /usr/bin/clang || true
sudo ln -s /usr/bin/clang++-11 /usr/bin/clang++ || true
sudo ln -s /usr/bin/llvm-link-11 /usr/bin/llvm-link || true
sudo ln -s /usr/bin/opt-11 /usr/bin/opt || true
sudo apt-get install -y python3-tk
sudo apt-get install -y libboost-all-dev
- name: "Setup DiscoPoP Profiler - Build"
run: |
rm -rf build
mkdir build
cd build
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DDP_CALLTREE_PROFILING=1 \
..
make -j3
- name: C++ unit tests
run: |
build/test/unit_tests/DiscoPoP_UT
execute_end_to_end_tests:
runs-on: ubuntu-20.04
name: Execute end-to-end tests
needs: execute_code_checks
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip' # uses requirements.txt
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Setup DiscoPoP Profiler - Install Dependencies
run: |
sudo apt-get update
sudo apt-get remove clang-8 clang-9 clang-10 clang-11 clang-12
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main"
sudo apt-get update
sudo apt-get install -y cmake libclang-11-dev clang-11 llvm-11
sudo ln -s /usr/bin/clang-11 /usr/bin/clang || true
sudo ln -s /usr/bin/clang++-11 /usr/bin/clang++ || true
sudo ln -s /usr/bin/llvm-link-11 /usr/bin/llvm-link || true
sudo ln -s /usr/bin/opt-11 /usr/bin/opt || true
sudo apt-get install -y python3-tk
sudo apt-get install -y libboost-all-dev
- name: "Setup DiscoPoP Profiler - Build"
run: |
rm -rf build
mkdir build
cd build
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DDP_CALLTREE_PROFILING=1 \
-DDP_CALLTREE_PROFILING_METADATA_CUTOFF=0 \
..
make -j3
- name: Python end-to-end-tests
run: |
python -m unittest -v -k *.end_to_end.*
update_wiki-build:
name: "Update Wiki - Build"
runs-on: ubuntu-20.04
needs: execute_code_checks
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./docs/
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
update_wiki-deploy:
name: "Update Wiki - Deploy"
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-20.04
needs: update_wiki-build
if: github.ref == 'refs/heads/master'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1