This repository has been archived by the owner on Aug 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 0.9
- Loading branch information
Showing
787 changed files
with
37,178 additions
and
67,299 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Scheduled Continuous Integration | ||
|
||
on: | ||
schedule: | ||
# Run every day at 6:30 AM | ||
- cron: '30 6 * * *' | ||
|
||
jobs: | ||
build: | ||
name: Scheduled CI (dev) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout trigger commit | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: develop | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install -y openvpn openconnect | ||
- name: Prepare VM | ||
if: success() | ||
run: | | ||
rm -f -r ./.git | ||
echo "${{ secrets.GATEWAY_KEY }}" > ~/sshkey | ||
sudo chmod 600 ~/sshkey | ||
- name: Establish VPN connection | ||
if: success() | ||
run: | | ||
# Force returning packets to be routed over public interface and not over the VPN | ||
sudo ip rule add from $(ip route get 1 | grep -Po '(?<=src )(\S+)') table 128 | ||
sudo ip route add table 128 to $(ip route get 1 | grep -Po '(?<=src )(\S+)')/32 dev $(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)') | ||
sudo ip route add table 128 default via $(ip -4 route ls | grep default | grep -Po '(?<=via )(\S+)') | ||
# Start network tunnel (TUN) device | ||
sudo openvpn --mktun --dev tun1 | ||
sudo ifconfig tun1 up | ||
# Launch VPN connection | ||
echo "${{ secrets.VPN_PASSWD }}" | sudo openconnect ${{ secrets.VPN_SERVER }} --user=${{ secrets.VPN_USER }} --background --passwd-on-stdin | ||
- name: Transfer source files to CI-server | ||
if: success() | ||
run: | | ||
scp -o StrictHostKeyChecking=no -i ~/sshkey -P ${{ secrets.GATEWAY_PORT }} -r ../DeerLab ${{ secrets.GATEWAY_HOST }}:/home/lufa/scp_traffic/ | ||
ssh -o StrictHostKeyChecking=no -i ~/sshkey -p ${{ secrets.GATEWAY_PORT }} ${{ secrets.GATEWAY_HOST }} scp -r /home/lufa/scp_traffic/DeerLab ${{ secrets.CISERVER_HOST }}:~ | ||
ssh -o StrictHostKeyChecking=no -i ~/sshkey -p ${{ secrets.GATEWAY_PORT }} ${{ secrets.GATEWAY_HOST }} "rm -f -r /home/lufa/scp_traffic/DeerLab" | ||
- name: Run test suite connected to CI-Server | ||
if: success() | ||
run: | | ||
ssh -tt -o StrictHostKeyChecking=no -i ~/sshkey -p ${{ secrets.GATEWAY_PORT }} -t ${{ secrets.GATEWAY_HOST }} ssh ${{ secrets.CISERVER_HOST }} << EOF | ||
#Run test suite | ||
cd DeerLab/build | ||
matlab -nodesktop -r "dltestsuite;exit" | ||
python3 uploadS3.py --keyfile ~/.ssh/aws_access_keys.txt --file "coverage_badge.json" --bucket deershields | ||
python3 uploadS3.py --keyfile ~/.ssh/aws_access_keys.txt --file "testsuite_badge.json" --bucket deershields | ||
#Transfer log file to the gateway | ||
scp -o StrictHostKeyChecking=no -i ~/.ssh/gateway_key -P ${{ secrets.GATEWAY_PORT }} ./dltestsuite.error ${{ secrets.GATEWAY_HOST }}:/home/lufa/scp_traffic/ || true | ||
#Delete the source files | ||
cd ~ | ||
rm -f -r DeerLab | ||
EOF | ||
- name: Disconnect CI-server | ||
if: success() | ||
run: | | ||
#Transfer log file to GitHub VM | ||
scp -o StrictHostKeyChecking=no -i ~/sshkey -P ${{ secrets.GATEWAY_PORT }} ${{ secrets.GATEWAY_HOST }}:/home/lufa/scp_traffic/dltestsuite.error ~/ || true | ||
ssh -o StrictHostKeyChecking=no -i ~/sshkey -p ${{ secrets.GATEWAY_PORT }} ${{ secrets.GATEWAY_HOST }} "rm -f /home/lufa/scp_traffic/dltestsuite.error" || true | ||
rm -f ~/sshkey | ||
- name: All tests passed successfully | ||
if: success() | ||
run: | | ||
! [ -f ~/dltestsuite.error ] && echo "Test suite passed" || (echo "Test suite failed" && deerfailed) | ||
- name: Disconnect VPN connection | ||
if: always() | ||
run: | | ||
#Ensure the VPN is disconnected by killing openconnect | ||
sudo pkill openconnect | ||
#Remove TUN device | ||
sudo ifconfig tun1 down | ||
sudo openvpn --rmtun --dev tun1 |
88 changes: 47 additions & 41 deletions
88
.github/workflows/docbuilder.yml → .github/workflows/deploy_ghpages.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,47 @@ | ||
name: Webpage update | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'docsrc/**' | ||
- '.github/**' | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install sphinx==1.8.0 | ||
python -m pip install sphinx_rtd_theme | ||
python -m pip install sphinxcontrib-matlabdomain | ||
python -m pip install sphinxcontrib-httpdomain | ||
python -m pip install boto3 | ||
sudo apt install texlive-extra-utils | ||
sudo apt-get install texlive-latex-extra | ||
- name: Run Sphinx Builder | ||
run: | | ||
cd docsrc | ||
sphinx-build -E -b html ./source ../docs | ||
- name: Connect and update DeerAnalysis AWS S3 Bucket | ||
run: | | ||
cd build | ||
python -m synchS3 -k ${{ secrets.S3_ACCESS }} -s ${{ secrets.S3_SECRETACCESS }} -d "../docs" --bucket deeranalysis.org | ||
name: Docs Build & Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- hotfixes | ||
paths: | ||
- 'build/**' | ||
- 'docsrc/**' | ||
|
||
schedule: | ||
# Run once a week on Sunday at 12:00 PM | ||
- cron: '0 12 * * 0' | ||
|
||
jobs: | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install sphinx==1.8.0 | ||
python -m pip install sphinx_rtd_theme | ||
python -m pip install sphinxcontrib-matlabdomain | ||
python -m pip install sphinxcontrib-httpdomain | ||
sudo apt install texlive-extra-utils | ||
sudo apt-get install texlive-latex-extra | ||
- name: Build multi-version docs | ||
run: | | ||
cd build | ||
python -m multiversedocs | ||
cd .. | ||
- name: Deploy to GH-Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./multidocs |
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.