Skip to content

Commit

Permalink
Compare reference (#606)
Browse files Browse the repository at this point in the history
Add CI test flow to save and store a compare reference
  • Loading branch information
melund authored Sep 28, 2021
1 parent 99bda02 commit 10c8008
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 35 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/create-compare-reference-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Save compare reference (Linux worker)

on:
push:
tags:
- 'ammr-*'
workflow_dispatch:
inputs:
git_reference:
description: 'Which Git reference to check out. Examples: "refs/tags/v0.2.1", "refs/heads/master".'
default: refs/tags/vX.Y.Z
required: true


concurrency:
group: compare-test-${{ github.ref }}
cancel-in-progress: true


jobs:
test:
runs-on: [self-hosted, linux]
container: ghcr.io/anybody/anybodycon-linux:latest

steps:
- name: Set variables
env:
DEFAULT_GIT_REFERENCE: refs/heads/master
run: |
echo "GIT_REFERENCE=${{ github.event.inputs.git_reference || env.DEFAULT_GIT_REFERENCE }}" >> $GITHUB_ENV
- name: Checkout repository at ${{ env.GIT_REFERENCE }}
uses: actions/checkout@v2
with:
ref: ${{ env.GIT_REFERENCE }}
fetch-depth: 0


- name: Run test for compare
env:
RLM_LICENSE_PASSWORD: ${{ secrets.LICENSE_PASSWORD }}
run: |
pytest --runslow \
-n 4 \
--anytest-output=.output \
--anytest-name=${{ env.GIT_REFERENCE }} \
Tests
- name: Construct storage name from AMS version
shell: python
run: |
import os, anypytools
name = anypytools.tools.anybodycon_version()
name = name.partition(" (")[0].replace(" ","")
name = "linux-ams-"+name.replace(".","-")
with open(os.environ["GITHUB_ENV"], "a") as fp:
fp.write(f"CONTAINER_NAME={name}")
- uses: LanceMcCarthy/[email protected]
name: Upload compare reference to Azure
with:
connection_string: ${{ secrets.AZURE_CONN_STR }}
container_name: ${{env.CONTAINER_NAME}}
source_folder: .output/${{ env.GIT_REFERENCE }}
destination_folder: ${{ env.GIT_REFERENCE }}
clean_destination_folder: true
fail_if_source_empty: true
1 change: 0 additions & 1 deletion .github/workflows/create-compare-reference.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Create compare reference

on:
pull_request:
push:
tags:
- 'ammr-*'
Expand Down
26 changes: 16 additions & 10 deletions .github/workflows/nighly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: Nightly Full AMMR tests
on:
schedule:
- cron: 0 3 * * *
pull_request_review_comment:
types: [created, edited]
pull_request:
types: [opened]
workflow_dispatch:

concurrency:
Expand All @@ -17,15 +13,11 @@ concurrency:
jobs:
test:
runs-on: [self-hosted, AnyBody]
if: contains(github.event.comment.body, '#Run full test') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'

env:
# Triggers a warning at 20 deg muscles angles
ShortestPathMaxAngle: 0.3491


strategy:
fail-fast: false

steps:
- uses: actions/checkout@v2
Expand All @@ -44,7 +36,6 @@ jobs:
if (Test-Path -Path $Env:MAMBA_ROOT_PREFIX\envs\_ammr_test) {$OPR = "update"} else {$OPR = "create"}
micromamba env $OPR -y -n _ammr_test -f Tests\test-environment.yml
- name: Run full AMMR tests
run: |
~\micromamba.exe shell hook -s powershell | Out-String | iex
Expand All @@ -53,4 +44,19 @@ jobs:
cd Tests
pytest --runslow -n 4 --instafail
test-linux:
runs-on: [self-hosted, linux]
container: ghcr.io/anybody/anybodycon-linux:latest

env:
# Triggers a warning at 20 deg muscles angles
ShortestPathMaxAngle: 0.3491

steps:
- uses: actions/checkout@v2
- name: Run full AMMR tests
RLM_LICENSE: [email protected]
RLM_LICENSE_PASSWORD: ${{ secrets.LICENSE_PASSWORD }}
run: pytest --runslow -n 4 --instafail Tests


22 changes: 0 additions & 22 deletions .github/workflows/test-container.yml

This file was deleted.

5 changes: 3 additions & 2 deletions Tests/AnyMocap/Test_ADL_Gait.any
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ Main =

AnyOperationSequence TestRunApplication =
{
//AnyOperation& ParameterId = Main.RunParameterIdentification;
AnyOperation& RunAnalysis = Main.RunAnalysis;
AnyOperation& LoadParameters = Main.RunAnalysis.LoadParameters;
AnyOperation& MarkerTracking = Main.RunAnalysis.MarkerTracking;
AnyOperation& InverseDynamics = Main.RunAnalysis.InverseDynamics;
};

#ifndef CREATE_IMAGE
Expand Down

0 comments on commit 10c8008

Please sign in to comment.