Fixing badge URL #160
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: Build | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
jobs: | |
run-tests-and-examples: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ 3.11 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install wrench-daemon | |
run: | | |
# WITHOUT DOCKER | |
#cd /tmp/ | |
#pip install jsonref | |
#sudo apt-get update | |
#sudo apt-get -y install gcc | |
#sudo apt-get -y install libasio-dev | |
#sudo apt-get -y install libboost-all-dev | |
#wget https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.tar.gz | |
#tar -xf v3.10.5.tar.gz | |
#cd json-3.10.5 | |
#cmake . | |
#make -j4 | |
#sudo make install | |
#cd .. | |
#wget --no-check-certificate https://framagit.org/simgrid/simgrid/-/archive/v3.36/simgrid-v3.36.tar.gz | |
#tar -xf simgrid-v3.36.tar.gz | |
#cd simgrid-v3.36 | |
#cmake -Denable_documentation=OFF . | |
#make -j4 | |
#sudo make install | |
#cd .. | |
#git clone https://github.com/wrench-project/wrench.git | |
#cd wrench | |
#cmake . | |
#make -j4 wrench-daemon | |
#sudo make install | |
#cd .. | |
#cd | |
# END WITHOUT DOCKER | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get update | |
sudo apt-get install -y docker-ce docker-ce-cli containerd.io | |
docker pull wrenchproject/wrench:unstable | |
- name: Start wrench-daemon | |
run: | | |
# WITHOUT DOCKER | |
#export LD_LIBRARY_PATH=/usr/local/lib/ | |
#wrench-daemon & | |
#echo "PID=$!" >> $GITHUB_ENV | |
# END WITHOUT DOCKER | |
docker run --name wrench-daemon-container -v `pwd`:/home/wrench wrenchproject/wrench:unstable wrench-daemon & | |
- name: Install the wrench Python API | |
run: | | |
# WIThOUT DOCKER | |
#pip install . | |
# END WITHOUT DOCKER | |
docker exec --workdir /home/wrench/ wrench-daemon-container sudo pip install . | |
- name: Run all tests | |
run: | | |
# WITHOUT DOCKER | |
#cd tests | |
#bash ./run_all_tests.sh | |
#cd .. | |
# END WITHOUT DOCKER | |
docker exec --workdir /home/wrench/tests wrench-daemon-container bash ./run_all_tests.sh | |
- name: Run all examples | |
run: | | |
# WITHOUT DOCKER | |
#cd examples | |
#bash ./run_all_examples.sh | |
#cd .. | |
# END WITHOUT DOCKER | |
docker exec --workdir /home/wrench/examples wrench-daemon-container bash ./run_all_examples.sh | |
- name: Compute coverage | |
run: | | |
# WITHOUT DOCKER | |
#pip install coverage | |
#bash ./.compute_coverage.sh | |
# END WITHOUT DOCKER | |
docker exec wrench-daemon-container sudo pip install coverage | |
#docker exec --workdir /home/wrench/ wrench-daemon-container bash ./.compute_coverage.sh | |
COVERAGE_PERCENTAGE=$(docker exec --workdir /home/wrench/ wrench-daemon-container bash ./.compute_coverage.sh) | |
echo "COVERAGE_PERCENTAGE=$COVERAGE_PERCENTAGE" >> $GITHUB_ENV | |
badge_url="https://img.shields.io/badge/coverage-${COVERAGE_PERCENTAGE}25-brightgreen" | |
echo "COVERAGE BADGE URL: $badge_url" | |
echo "COVERAGE_BADGE_URL=$badge_url" >> $GITHUB_ENV | |
- name: Kill wrench-daemon | |
run: | | |
# WITHOUT DOCKER | |
#kill ${{ env.PID }} || true | |
# END WITHOUT DOCKER | |
docker kill wrench-daemon-container | |
build-documentation: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ 3.11 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get install -y python3-sphinx sphinx-rtd-theme-common | |
pip install sphinx-rtd-theme | |
pip install sphinx_rtd_theme recommonmark | |
- name: Check package install | |
run: | | |
pip install . | |
- name: Build documentation | |
run: | | |
cd docs | |
make html |