Skip to content

Try to fix MSVC compilation error. #33

Try to fix MSVC compilation error.

Try to fix MSVC compilation error. #33

Workflow file for this run

name: ci
on: [push]
permissions:
contents: write
jobs:
analysis-headers:
runs-on: ubuntu-latest
container: ubuntu:20.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Generate Headers & Compare
run: |
./scripts/generate_streampu_header.sh streampu.hpp
diff streampu.hpp include/streampu.hpp
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: analysis-headers
path: streampu.hpp
analysis-clang-format:
runs-on: ubuntu-latest
container: ubuntu:22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install clang-format
run: |
apt-get update
apt-get -y install clang-format
shell: bash
- name: Invoke clang-format on the source code & Compare
run: |
mkdir original_code
cp -r include original_code
cp -r src original_code
cp -r tests original_code
cp -r signal_tracer original_code
./scripts/apply_clang_format.sh
mkdir new_code
cp -r include new_code
cp -r src new_code
cp -r tests new_code
cp -r signal_tracer new_code
diff -r new_code original_code
shell: bash
build-linux-gcc-x64-avx2:
runs-on: ubuntu-latest
needs: [analysis-headers]
container: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_gcc:v9.3.0
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: true
- name: Build
run: |
export CXX="g++"
export CFLAGS="-Wall -funroll-loops -m64 -mavx2 -mfma"
export LFLAGS="-static -static-libgcc -static-libstdc++ -Wl,--whole-archive -lrt -lpthread -Wl,--no-whole-archive"
export GIT_TAG="v0.0.0"
export CMAKE_OPT="-DSPU_TESTS=ON -DSPU_COMPILE_STATIC_LIB=ON -DSPU_COMPILE_SHARED_LIB=ON -DSPU_STACKTRACE=OFF -DSPU_OVERRIDE_VERSION=$GIT_TAG"
export NAME="build_linux_gcc_x64_avx2"
source ./ci/tools/threads.sh
./ci/build-linux-macos.sh
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build-linux-gcc-x64-avx2
path: build_linux_gcc_x64_avx2
build-linux-gcc-coverage:
runs-on: ubuntu-latest
needs: [analysis-headers]
container: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_gcc:v9.3.0
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: true
- name: Build
run: |
export CXX="g++"
export CFLAGS="-Wall -funroll-loops -msse4.2 --coverage"
export LFLAGS="--coverage"
export GIT_TAG="v0.0.0"
export CMAKE_OPT="-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG=-O0 -DSPU_TESTS=ON -DSPU_COMPILE_STATIC_LIB=ON -DSPU_COMPILE_SHARED_LIB=ON -DSPU_OVERRIDE_VERSION=$GIT_TAG"
source ./ci/tools/threads.sh
./ci/build-linux-macos.sh
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: build
build-linux-clang:
runs-on: ubuntu-latest
needs: [analysis-headers]
container: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_clang:v10.0.0
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: true
- name: Build
run: |
export CXX="clang++"
export CFLAGS="-Wall -Wno-overloaded-virtual -funroll-loops"
export GIT_TAG="v0.0.0"
export CMAKE_OPT="-DSPU_TESTS=ON -DSPU_COMPILE_STATIC_LIB=ON -DSPU_COMPILE_SHARED_LIB=ON -DSPU_OVERRIDE_VERSION=$GIT_TAG"
export NAME="build_linux_clang"
source ./ci/tools/threads.sh
./ci/build-linux-macos.sh
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build-linux-clang
path: build_linux_clang
test-coverage-regression:
runs-on: ubuntu-latest
needs: [build-linux-gcc-coverage]
container: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_coverage
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: build
path: build/
- name: Run Tests & Collect Code Coverage
run: |
ls -lah ./build/
ls -lah ./build/bin/
chmod +x ./build/bin/*
./ci/test-coverage-regression.sh
shell: bash
- name: Generate Code Coverage Report Files
run: ./ci/coverage-linux.sh
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: test-regression-code-coverage-report
path: |
code_coverage_report/
build/Testing
test-memcheck-regression:
runs-on: ubuntu-latest
needs: [analysis-headers]
container: registry.gitlab.com/aff3ct/aff3ct/x86_64_ubuntu_valgrind
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: true
- name: Build & Memcheck
run: |
export CXX="g++"
export CFLAGS="-Wall -funroll-loops -m64 -mavx2 -mfma"
export GIT_TAG="v0.0.0"
export CMAKE_OPT="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DSPU_TESTS=ON -DSPU_COMPILE_STATIC_LIB=ON -DSPU_COMPILE_SHARED_LIB=ON -DSPU_LINK_HWLOC=ON -DSPU_OVERRIDE_VERSION=$GIT_TAG"
source ./ci/tools/threads.sh
./ci/build-linux-macos.sh
./ci/test-memcheck-regression.sh
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: test-memcheck-regression
path: build/Testing
coverage:
runs-on: ubuntu-latest
needs: [test-coverage-regression]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: test-regression-code-coverage-report
path: test_regression_code_coverage_report/
- name: Produce the Coverage Report
uses: insightsengineering/coverage-action@v2
with:
# Path to the Cobertura XML report.
path: ./test_regression_code_coverage_report/code_coverage_report/streampu.xml
# Minimum total coverage, if you want to the
# workflow to enforce it as a standard.
# This has no effect if the `fail` arg is set to `false`.
threshold: 50.000
# Fail the workflow if the minimum code coverage
# reuqirements are not satisfied.
fail: true
# Publish the rendered output as a PR comment
publish: true
# Create a coverage diff report.
diff: true
# Branch to diff against.
# Compare the current coverage to the coverage
# determined on this branch.
diff-branch: master
# This is where the coverage reports for the
# `diff-branch` are stored.
# Branch is created if it doesn't already exist'.
diff-storage: _xml_coverage_reports
# A custom title that can be added to the code
# coverage summary in the PR comment.
coverage-summary-title: "Code Coverage Summary"
deploy:
if: contains( github.ref, 'develop')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force