Skip to content

Commit

Permalink
unifying builds
Browse files Browse the repository at this point in the history
  • Loading branch information
milosz-barylowicz committed Feb 25, 2024
1 parent 2e3ed4a commit 4c5e11f
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 38 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/build_and_validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: linux-build-and-validation

on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]

env:
BUILD_DIR: ${{ github.workspace }}/build
TEST_DIR: ${{ github.workspace }}/build/tests

jobs:
build-validation:
runs-on: [ 'ubuntu-22.04' ]

steps:
- uses: actions/checkout@v4.1.1

- name: python3-setting-up
run: |
sudo apt update && \
sudo apt install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:deadsnakes/ppa && \
sudo apt update && \
sudo apt install python3.11 python3.11-venv -y
- name: python3-venv
run: |
python3.11 -m venv venv && \
source venv/bin/activate
- name: CMake-configuration-and-project-building
run: |
cmake -B ${{ env.BUILD_DIR }} -S ${{ github.workspace }} && \
cmake --build ${{ env.BUILD_DIR }}
- name: unit-tests-execution
working-directory: ${{ env.TEST_DIR }}
run: |
python run_unit_tests.py
sanitizers:
needs: [ 'build-validation' ]
runs-on: [ 'ubuntu-22.04' ]

steps:
- uses: actions/checkout@v4.1.1

- name: python3-setting-up
run: |
sudo apt update && \
sudo apt install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:deadsnakes/ppa && \
sudo apt update && \
sudo apt install python3.11 python3.11-venv -y
- name: python3-venv
run: |
python3.11 -m venv venv && \
source venv/bin/activate
- name: asan
run: |
cmake -B ${{ env.BUILD_DIR }} -S ${{ github.workspace }} -DASan=ON && \
cmake --build ${{ env.BUILD_DIR }} && \
python ${{ env.TEST_DIR }}/run_unit_tests.py && \
rm -rf ${{ env.BUILD_DIR }}
- name: ubsan
run: |
cmake -B ${{ env.BUILD_DIR }} -S ${{ github.workspace }} -DUBSan=ON && \
cmake --build ${{ env.BUILD_DIR }} && \
python ${{ env.TEST_DIR }}/run_unit_tests.py && \
rm -rf ${{ env.BUILD_DIR }}
- name: lsan
run: |
cmake -B ${{ env.BUILD_DIR }} -S ${{ github.workspace }} -DLSan=ON && \
cmake --build ${{ env.BUILD_DIR }} && \
python ${{ env.TEST_DIR }}/run_unit_tests.py && \
rm -rf ${{ env.BUILD_DIR }}
38 changes: 0 additions & 38 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,6 @@ on:
workflow_dispatch:

jobs:
unix-based-unit-tests:
strategy:
matrix:
os: [ubuntu-22.04]

env:
BUILD_DIR: ${{ github.workspace }}/build
TEST_DIR: ${{ github.workspace }}/build/tests

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4.1.1

- name: configuring CMake
run: cmake -B ${{ env.BUILD_DIR }} -S ${{ github.workspace }}

- name: building
run: cmake --build ${{ env.BUILD_DIR }}

- name: setting up python3
run: |
sudo apt update &&\
sudo apt install build-essential software-properties-common -y &&\
sudo add-apt-repository ppa:deadsnakes/ppa &&\
sudo apt update &&\
sudo apt install python3.11 -y &&\
python3 --version
- name: python venv setting up
run: |
python3 -m venv venv &&\
source venv/bin/activate
- name: unit-tests executing
working-directory: ${{ env.TEST_DIR }}
run: python run_unit_tests.py

windows-based-unit-tests:
strategy:
matrix:
Expand Down

0 comments on commit 4c5e11f

Please sign in to comment.