ComNetsEmu CI #129
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: ComNetsEmu CI | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
- dev-zuo | |
pull_request: | |
branches: | |
- master | |
- dev | |
schedule: | |
# Run CI at 00:00 on every Monday | |
- cron: '0 0 * * MON' | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout ComNetsEmu source | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install ComNetsEmu | |
run: | | |
# Full upgrade is too slow... | |
sudo apt-get update -qq | |
# Remove the pre-installed versions on the CI VM. They are too old and lead to install errors | |
sudo apt-get remove -q -y docker docker-engine docker.io containerd runc | |
# The CI VM can not resolve the runc and containerd dependency of docker.io automatically... I don't know the detailed reason yet... | |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y runc containerd | |
bash ./util/install.sh -a | |
- name: Run core tests | |
run: | | |
sudo make test-quick | |
# Thanks to Baldomo (https://github.com/Baldomo) | |
# Github pages actions are copied/modified from his contribution | |
- name: Build HTML docs | |
run: | | |
make doc | |
- name: Deploy HTML docs | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./doc/build/html |