Skip to content

Commit

Permalink
on_pull_request.yml is working
Browse files Browse the repository at this point in the history
Added downloading of boost and it usage in build and test
  • Loading branch information
extio1 committed May 29, 2024
1 parent 679389d commit 3595901
Showing 1 changed file with 54 additions and 8 deletions.
62 changes: 54 additions & 8 deletions .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,51 @@ on:
- 'dev'

jobs:
download-dependencies:
runs-on: ubuntu-latest
steps:
- run: mkdir install-artifacts
- name: Download dependencies
run: |
wget https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.gz
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: dependencies-artifact
path: boost_1_80_0.tar.gz

build:
needs: [download-dependencies]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- run: mkdir build
- run: cmake -Bbuild
- run: cmake --build build
- uses: actions/upload-artifact@v4
- uses: actions/download-artifact@v4
with:
name: dependencies-artifact

- name: Install Boost
run: |
tar -xzf boost_1_80_0.tar.gz
cd boost_1_80_0
./bootstrap.sh --with-libraries=serialization
sudo ./b2 install
- name: Build project
run: |
mkdir build
cmake -Bbuild
cmake --build build
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: build

test:
needs: [build]
needs: [build, download-dependencies]
runs-on: ubuntu-latest

steps:
Expand All @@ -29,6 +60,21 @@ jobs:
with:
name: build-artifacts
path: build
- run: chmod +x build/test/model/*
- run: chmod +x build/test/controller/*
- run: GTEST_COLOR=1 ctest -V --test-dir build/
- uses: actions/download-artifact@v4
with:
name: dependencies-artifact

- name: Install Boost
run: |
tar -xzf boost_1_80_0.tar.gz
cd boost_1_80_0
./bootstrap.sh --with-libraries=serialization
sudo ./b2 install
- name: Add lanch permissions for text executables
run: |
chmod +x build/test/model/*
chmod +x build/test/controller/*
- name: Run tests
run: GTEST_COLOR=1 ctest -V --test-dir build/

0 comments on commit 3595901

Please sign in to comment.