Added a --num-commports argument to the wrench daemon #2124
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-Linux | |
on: | |
push: | |
paths-ignore: | |
- 'doc/**' | |
- '**.md' | |
- '**.rst' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: ${{ always() }} | |
strategy: | |
matrix: | |
include: | |
- build: "Debian Bullseye - g++-10" | |
DIST: debian-bullseye | |
COMPILER: gcc10 | |
batsched: off | |
- build: "Debian Bookworm - g++-12" | |
DIST: debian-bookworm | |
COMPILER: gcc12 | |
batsched: off | |
- build: "Ubuntu Jammy Jellyfish - clang++-14" | |
DIST: ubuntu-jammy | |
COMPILER: clang14 | |
batsched: off | |
- build: "Ubuntu Jammy Jellyfish - g++-11" | |
DIST: ubuntu-jammy | |
COMPILER: gcc11 | |
batsched: off | |
- build: "Ubuntu Jammy Jellyfish - g++-11 - batsched" | |
DIST: ubuntu-jammy | |
COMPILER: gcc11-batsched | |
batsched: on | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Configure Docker | |
run: | | |
sudo apt-get update | |
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 | |
- name: Source Build and Test | |
env: | |
DIST: ${{ matrix.DIST }} | |
COMPILER: ${{ matrix.COMPILER }} | |
batsched: ${{ matrix.batsched }} | |
run: | | |
echo "Downloading wrench..."; | |
docker pull wrenchproject/wrench-build:${DIST}-${COMPILER}; | |
docker run -m 4g -d -t --name=wrench wrenchproject/wrench-build:${DIST}-${COMPILER} bash; | |
docker exec wrench git clone https://github.com/wrench-project/wrench; | |
# if not the master branch, switch to branch | |
if [[ "$GITHUB_REF" != "refs/heads/master" ]]; then | |
BRANCH_NAME=$(echo ${GITHUB_REF} | sed 's/refs\/heads\///g'); | |
docker exec -w /home/wrench/wrench wrench git checkout ${BRANCH_NAME}; | |
fi | |
# build wrench, including unit_tests and examples | |
echo "Building wrench..."; | |
docker exec wrench mkdir wrench/build; | |
docker exec -w /home/wrench/wrench/build wrench cmake -DENABLE_BATSCHED=${batsched} -DCMAKE_VERBOSE_MAKEFILE=ON ..; | |
docker exec -w /home/wrench/wrench/build wrench make all unit_tests examples wrench-daemon; | |
docker exec -w /home/wrench/wrench/build wrench sudo make install | |
# run unit_tests | |
echo "Running tests..."; | |
docker exec -w /home/wrench/wrench/build wrench ./unit_tests; | |
# run examples | |
echo "Running examples..."; | |
#docker exec -w /home/wrench/wrench/build/examples wrench ./run_all_examples.sh wrench-example-batch-smpi-action; | |
docker exec -w /home/wrench/wrench/build/examples wrench ./run_all_examples.sh | |
# run wrench-init | |
echo "Testing wrench-init..."; | |
docker exec -w /home/wrench/wrench/build wrench python3 ./tools/wrench/wrench-init/wrench-init -a ACTION -d ./wrench-init-generated-simulator | |
docker exec -w /home/wrench/wrench/build/wrench-init-generated-simulator/build wrench cmake .. | |
docker exec -w /home/wrench/wrench/build/wrench-init-generated-simulator/build wrench make | |
- name: Documentation Build and Deployment | |
env: | |
DIST: ${{ matrix.DIST }} | |
COMPILER: ${{ matrix.COMPILER }} | |
batsched: ${{ matrix.batsched }} | |
TOKEN_GITHUB: ${{ secrets.TOKEN_GITHUB }} | |
run: | | |
if [[ "$DIST" == "ubuntu-jammy" && "$COMPILER" == "gcc11" && "$batsched" == "off" ]]; then | |
docker exec -w /home/wrench/wrench/build wrench cmake -DENABLE_BATSCHED=${batsched} -DCMAKE_VERBOSE_MAKEFILE=ON ..; | |
docker exec -w /home/wrench/wrench/build wrench make doc; | |
docker cp wrench:/home/wrench/wrench/docs .; | |
cp -R ./docs/build $HOME/gh-pages-to-deploy; | |
echo "Starting to update gh-pages" | |
#copy data we're interested in to other place | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
#using token clone gh-pages branch | |
git clone --quiet --branch=gh-pages https://${TOKEN_GITHUB}@github.com/wrench-project/wrench.git gh-pages > /dev/null; | |
#go into directory and copy data we're interested in to that directory | |
cd gh-pages; | |
cp -Rf $HOME/gh-pages-to-deploy/* .; | |
touch .nojekyll; | |
#add, commit and push files | |
git add -f .; | |
git diff-index --quiet HEAD || git commit -m "GitHub build $GITHUB_RUN_NUMBER"; | |
git push -fq origin gh-pages > /dev/null; | |
echo "Done updating gh-pages."; | |
fi | |
- name: Code Coverage | |
env: | |
DIST: ${{ matrix.DIST }} | |
COMPILER: ${{ matrix.COMPILER }} | |
batsched: ${{ matrix.batsched }} | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
run: | | |
if [[ "$DIST" == "ubuntu-jammy" && "$COMPILER" == "gcc11" && "$batsched" == "off" ]]; then | |
docker exec -w /home/wrench/wrench/build wrench lcov --directory . --capture --output-file coverage.info; | |
docker exec -w /home/wrench/wrench/build wrench lcov --remove coverage.info '*/test/*' '*/examples/*' '*/include/*' --output-file coverage.info; | |
docker cp wrench:/home/wrench/wrench/build/coverage.info .; | |
bash <(curl -s https://codecov.io/bash) -f coverage.info -t ${CODECOV_TOKEN}; | |
fi | |
- name: Slack Notification | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_CHANNEL: github | |
SLACK_ICON: https://github.com/wrench-project.png?size=48 | |
SLACK_USERNAME: wrench-builds | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
MSG_MINIMAL: ref,actions url, commit | |
SLACK_TITLE: Build ${{ matrix.build }} | |
SLACK_FOOTER: '' |