Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean branch #12

Open
wants to merge 171 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
4c22c0b
[ci] Upgrade CI and clang-format
gergondet Oct 25, 2022
43f370a
[tests] Change the output of test-kinematics
gergondet Oct 29, 2022
81c4a66
Remove useless files
gergondet Nov 29, 2022
dbd609c
[ci] Use reusable workflow for packaging
gergondet Nov 29, 2022
3d7fabc
Release v1.5.0
gergondet Nov 29, 2022
a21a0aa
Corrected minor errors
ArnaudDmt Jul 8, 2022
b1560c9
Wrote the function computeAMatrix() with the right expressions
ArnaudDmt Aug 1, 2022
d679893
Minor changes to a Jacobian computation
ArnaudDmt Aug 1, 2022
be20e77
added update() function for LocalRightKinematics
ArnaudDmt Aug 12, 2022
bcc435f
changed integrate function
ArnaudDmt Aug 13, 2022
41e7448
backup
ArnaudDmt Aug 15, 2022
ee02896
Corrections in the LocalKinematics expressions
ArnaudDmt Aug 22, 2022
0385a16
Corrections on the upate of LocalKinematics
ArnaudDmt Aug 23, 2022
b44a595
Compilable with LocalKinematics (some errors)
ArnaudDmt Aug 23, 2022
1b4be09
Correction of minor errors
ArnaudDmt Aug 23, 2022
665baf9
Test precision : 1e-10
ArnaudDmt Aug 25, 2022
e9efbd9
Test precision : 1e-10 : rigid-body-kinematics
ArnaudDmt Aug 26, 2022
f6e5a0f
adapted the test to the local kinematics
ArnaudDmt Aug 30, 2022
22c2a28
Adaptation to the LocalKinematics
ArnaudDmt Aug 30, 2022
7b396c2
Kinematics test working
ArnaudDmt Aug 30, 2022
51d0c6d
Correction of pos/ori from acc : *2 instead of /2
ArnaudDmt Aug 30, 2022
1ce789e
added the setToDiffNoAlias function for Kinematics and LocalKinematics
ArnaudDmt Aug 31, 2022
c7e740e
added the setToDiffNoAlias function for Kinematics and LocalKinematics
ArnaudDmt Aug 31, 2022
4a4d992
Added the conversion between user and centroid frame and assigned the…
ArnaudDmt Sep 1, 2022
3d58968
Corrected a small mistake in the LocalKinematics integrate() function
ArnaudDmt Sep 1, 2022
b7e3445
Removed two useless functions
ArnaudDmt Sep 1, 2022
29cb2d4
Final version of the LocalKinematics test : test succeeded
ArnaudDmt Sep 1, 2022
d5c21a3
Minor corrections
ArnaudDmt Sep 14, 2022
7efd916
Fixed assert in unmodeledWrenchIndexTangent() : prompting an error if…
ArnaudDmt Sep 20, 2022
a03fc97
Debugging outputs
ArnaudDmt Sep 20, 2022
e69600f
Added the initialization of the state vector, corrected (partially?) …
ArnaudDmt Sep 20, 2022
3781e55
Allows to attach a program to the debugger
ArnaudDmt Sep 20, 2022
beff7a0
Minor corrections
ArnaudDmt Sep 29, 2022
c02397a
fixed issues with the use of contact's and imu's kinematics
ArnaudDmt Sep 29, 2022
9382ba2
fixed the conversion from user to centroid frame
ArnaudDmt Sep 29, 2022
b34a839
added functions to access the measurements and measurement prediction…
ArnaudDmt Sep 29, 2022
cf02a88
[fix] the gyroBiasIndex function is used to construct the state vecto…
ArnaudDmt Sep 29, 2022
ec0d863
[Debug] testing the predicted measurements without using them in the …
ArnaudDmt Sep 29, 2022
f9843b8
[fix] the kinematics were not reset during the call of from vector an…
ArnaudDmt Sep 29, 2022
1e5e6d0
[Debug] adding debugging outputs
ArnaudDmt Sep 29, 2022
32c3ebc
[Debug] adding a threshold on the A matrix coefficients to detect out…
ArnaudDmt Sep 29, 2022
aad6416
[fix] corrected an error in the contact's torque expression
ArnaudDmt Sep 29, 2022
1be1594
[fix] corrected an error in the contact's torque expression
ArnaudDmt Sep 29, 2022
95389e8
[Debug] threshold to detect outliers on the contact's torque
ArnaudDmt Sep 29, 2022
c5e8896
added build-dbg to gitignore
ArnaudDmt Sep 30, 2022
050cde4
Adding the getMass function
ArnaudDmt Oct 5, 2022
4194ed5
Adding the comparison between the analytic and FD A matrices
ArnaudDmt Oct 5, 2022
371a149
[Debug] debugging outputs
ArnaudDmt Oct 5, 2022
8bc9f88
[Fix] correcting default covariances
ArnaudDmt Oct 5, 2022
68a8ddf
[Fix] removing commented code
ArnaudDmt Oct 5, 2022
56750c1
[Variables] renaming variables with the kinematics nomenclature
ArnaudDmt Oct 5, 2022
d1ffef7
[Fix] correcting an error in the analytical A matrix computation
ArnaudDmt Oct 5, 2022
034ddbe
correction in the documentation of addContact
ArnaudDmt Oct 11, 2022
04aec35
re-enbling the innovation
ArnaudDmt Oct 11, 2022
7aa4fb6
[Fix] correction of the initalzation of the contacts : now initializi…
ArnaudDmt Oct 11, 2022
cf9b991
[Fix] the test prior to contacts removal was wrong
ArnaudDmt Oct 11, 2022
6dab020
[Debug] Removing debugging outputs
ArnaudDmt Oct 11, 2022
7fe6859
[Fix] removed a non-necessary condition that prevented from getting t…
ArnaudDmt Oct 12, 2022
e8d98bd
[Debug] allows to access the variable withAccelerationEstimation, use…
ArnaudDmt Oct 12, 2022
066a90c
Added the update of the global kinematics for later use
ArnaudDmt Oct 12, 2022
6b8580e
[Variables] added a description of k_data_ and k_est_
ArnaudDmt Oct 12, 2022
72f1274
[Kinematics] added the operator= function from LocKine to Kinematics …
ArnaudDmt Oct 12, 2022
a8f79e4
[Debug] added the withInnovation variable. To remove after debugging
ArnaudDmt Oct 20, 2022
282e21d
[Debug] To remove : added functions and variables to plot the compone…
ArnaudDmt Oct 21, 2022
15af460
Few name changes and minor changes
ArnaudDmt Nov 18, 2022
e012bdf
[RigidBodyKinematics] minor change
ArnaudDmt Nov 18, 2022
a349c50
[Debug] Minor changes and outputs
ArnaudDmt Nov 18, 2022
dbc4445
[MAJOR FIX] the wrong contact reference was used in the stateDynamics…
ArnaudDmt Nov 18, 2022
4844e74
small fix in function getContactIsSetByNum
ArnaudDmt Nov 18, 2022
a75e7de
[RigidBodyKinematics] minor change
ArnaudDmt Nov 18, 2022
21b44a9
[Fix] Now initializing with the right covariances
ArnaudDmt Dec 5, 2022
7260c2c
[Logger] getter to log some variables
ArnaudDmt Dec 9, 2022
c594376
[Debug] Commenting out a debugging output
ArnaudDmt Dec 9, 2022
77c91c5
[Debug] useless lines
ArnaudDmt Dec 9, 2022
f758fd4
[Fix] removed the function getPredictedAccelerationByStateDynamics ca…
ArnaudDmt Dec 13, 2022
37280da
Added runge kutta approximation for integration of LocalKinematics
ArnaudDmt Dec 15, 2022
6a2a89d
added the withRungeKutta_ variable
ArnaudDmt Dec 15, 2022
4493993
Using temporary variable for contacts and wrench computations
ArnaudDmt Dec 15, 2022
17a83e4
Computing tranpose orientation matrix without intermediary variable
ArnaudDmt Dec 15, 2022
420a5f7
Computing tranpose orientation matrix without intermediary variable i…
ArnaudDmt Dec 15, 2022
557788a
[Error] Adding Runge Kutta to Kinematics objects
ArnaudDmt Dec 15, 2022
4a25a5d
Fixed Runge Kutta for LocalKinematics (untested for Kinematics)
ArnaudDmt Dec 15, 2022
3b6043d
[Error] cout integrateRungeKutta with Kinematics
ArnaudDmt Dec 15, 2022
147fc71
Clang formatting
ArnaudDmt Dec 15, 2022
0de4510
Added test-runge-kutta
ArnaudDmt Dec 20, 2022
78b5b6b
[Fix] using the wrong integrate function in rungeKutta for Kinematics
ArnaudDmt Dec 20, 2022
7ca635e
[Fix] fixed the expression used in the integration of the local linea…
ArnaudDmt Dec 20, 2022
a179366
[NaN] implementation of checkNan for CheckedItem (except Quaternions)…
ArnaudDmt Dec 20, 2022
41ebd7c
Adding the test hasNaN to CheckedItems
ArnaudDmt Jan 30, 2023
3b913e1
Minor changes
ArnaudDmt Jan 30, 2023
3249ea4
minor change
ArnaudDmt Jan 30, 2023
59a8790
[Working] Using unchecked ref in Kinematics, Kinetics Observer "working"
ArnaudDmt Jan 30, 2023
92155c7
Added reset prediction functions to the KF
ArnaudDmt Feb 1, 2023
a5d5eb9
Correcting the runge kutta dynamics integration (to be verified)
ArnaudDmt Feb 6, 2023
49fc532
Correcting the runge kutta dynamics integration (to be verified) part 2
ArnaudDmt Feb 6, 2023
66d9755
Implemented addUnmodeledWrench_ and addContactWrench_ (still unused)
ArnaudDmt Feb 6, 2023
b1bc25d
Minor changes
ArnaudDmt Feb 6, 2023
faac197
Implement the comparison functions for the jacobians
ArnaudDmt Feb 7, 2023
640a74f
[Fix] correction of the jacobian of the angular acceleration wrt the …
ArnaudDmt Feb 7, 2023
6c9561e
[Fix] update the worldContactPose variable before the contact wrench …
ArnaudDmt Feb 7, 2023
3f269b3
correct the expression of the visco-elastic torque
ArnaudDmt Feb 7, 2023
6316a72
[CMake] add the unit test for the analytical A jacobian to the CMake …
ArnaudDmt Feb 7, 2023
11a44c2
create the function skewSymmetricToRotationVector
ArnaudDmt Feb 13, 2023
ad31f38
rename updateKine() function to updateLocalKineAndContacts_()
ArnaudDmt Feb 13, 2023
17554b5
rename updateKine() function to updateLocalKineAndContacts_() part 2
ArnaudDmt Feb 13, 2023
5062e95
continue the implementation of the test of the analytical jacobians
ArnaudDmt Feb 13, 2023
73128df
compute the acceleration variables at the beginning of the analytical…
ArnaudDmt Feb 13, 2023
10ca92b
add the analytical jacobiano f the local position wrt the external to…
ArnaudDmt Feb 13, 2023
26b1205
correct the jacobian of the orientation integration wrt to the angula…
ArnaudDmt Feb 13, 2023
d31470f
correct the jacobian of the orientation integration wrt to the angula…
ArnaudDmt Feb 13, 2023
8c1d5cb
correct the jacobian of omega integration wrt itself
ArnaudDmt Feb 13, 2023
c517a0f
correct the "non-use" of the predicted rest position of the contact i…
ArnaudDmt Feb 13, 2023
9f914db
correct the jacobian of the position wrt the contact force
ArnaudDmt Feb 13, 2023
99a2b5b
add the jacobian of the position wrt the contact torque
ArnaudDmt Feb 13, 2023
8761296
correct the jacobian of the contact force wrt the orientation : wrong…
ArnaudDmt Feb 13, 2023
6a2caf0
correct the jacobian of the contact force wrt the contact position
ArnaudDmt Feb 13, 2023
6d90a66
correct the jacobian of the contact force wrt the linear velocity
ArnaudDmt Feb 13, 2023
26c28fc
correct the jacobian of the contact force wrt the external torque
ArnaudDmt Feb 13, 2023
b2d160d
correct the jacobian of the contact force wrt the contact torque
ArnaudDmt Feb 13, 2023
7ff25fd
minor changes
ArnaudDmt Feb 13, 2023
b52d21b
correct the jacobian of the contact torque wrt the orientation
ArnaudDmt Feb 13, 2023
9553e3e
correct the computation of the visco-elastic contact torque and use t…
ArnaudDmt Feb 13, 2023
2a27261
modify the comparison function between the FD and analytical jacobian…
ArnaudDmt Feb 13, 2023
b86a891
correct the integration of the local position
ArnaudDmt Feb 13, 2023
2afc4e2
correct the jacobian of the contact torque wrt the contact orientation
ArnaudDmt Feb 13, 2023
946557d
apply stash
ArnaudDmt Feb 13, 2023
2a9b34a
Correct test-local-kinematics
ArnaudDmt Feb 14, 2023
175fa6c
correct the update function of LocalKinematics
ArnaudDmt Feb 14, 2023
18c45a6
Correct test-local-kinematics
ArnaudDmt Feb 15, 2023
98ec3bd
Cleaner implementation of test-analytical-jacobians
ArnaudDmt Feb 15, 2023
9465c28
change computeAMatrix() to public
ArnaudDmt Feb 15, 2023
395d7c2
correct the update function of LocalKinematics
ArnaudDmt Feb 15, 2023
d0fc5e1
remove the test functions from kinetics-observer.cpp
ArnaudDmt Feb 15, 2023
fef43d7
remove the test functions from kinetics-observer.cpp
ArnaudDmt Feb 15, 2023
72e7375
create updateMeasurements function
ArnaudDmt Feb 20, 2023
db932fe
add id variable to Sensors
ArnaudDmt Feb 20, 2023
c3aece7
minor fixes
ArnaudDmt Feb 20, 2023
5bac3f6
minor fixes
ArnaudDmt Feb 20, 2023
bd5ed0c
add the gyrometer bias
ArnaudDmt Feb 20, 2023
fa790f2
Implement the analytical C jacobian
ArnaudDmt Feb 20, 2023
8310874
Improve the analytical jacobians test
ArnaudDmt Feb 20, 2023
79f3061
correct the analytical Jacobian
ArnaudDmt Feb 21, 2023
7629783
correct unmodeledWrench and gyroBias Jacobians
ArnaudDmt Feb 28, 2023
ce43971
prevent unchecked acceleration error
ArnaudDmt Feb 28, 2023
7b1aae1
[fix] remove withInnovation variable
ArnaudDmt Mar 14, 2023
c3bf9d2
getters and setters for dynamical variables
ArnaudDmt Mar 14, 2023
13f4ef1
[fix] remove withInnovation variable part2
ArnaudDmt Mar 14, 2023
1930e3a
getters and setters for dynamical variables part2
ArnaudDmt Mar 14, 2023
606278d
add external wrench from user frame
ArnaudDmt Mar 14, 2023
e3f4ebf
[fix] add angAcc to flagsIMUKine
ArnaudDmt Mar 14, 2023
d4fdcb7
use num only for Contacts and IMUs
ArnaudDmt Mar 14, 2023
f61fb27
[fix] remove withInnovation variable part3
ArnaudDmt Mar 14, 2023
5d69c61
[fix] wrong userIMUKinematics
ArnaudDmt Mar 14, 2023
af4e088
stateDifference initialized to zero
ArnaudDmt Mar 14, 2023
f92b46c
[Working] Estimator working
ArnaudDmt Mar 17, 2023
46f2c19
change test threshold
ArnaudDmt Mar 29, 2023
0c3303e
add getNumberOfSetContacts option
ArnaudDmt Mar 29, 2023
c9ccb99
[fix] getting unchecked ref in kine compositions
ArnaudDmt Mar 29, 2023
91b2d2d
convertFromUserToCentroid made public
ArnaudDmt May 25, 2023
2eb05fe
Merge branch 'fixClosedLoop'
ArnaudDmt May 25, 2023
30e9779
[varName] change reference pose of contact to rest pose
ArnaudDmt May 29, 2023
bc292ae
[Clean-up] and add doc/comments
ArnaudDmt May 29, 2023
2fff960
correct some warnings
ArnaudDmt May 29, 2023
53e3db3
add zeroKinematics function
ArnaudDmt May 31, 2023
44b7c04
fix compilation
ArnaudDmt Jun 2, 2023
ee87679
[Tilt] add function to give x1 explicitely
ArnaudDmt Jun 14, 2023
5e7701b
[RigBodKin] fix a wrong condition
ArnaudDmt Jun 14, 2023
3b7eaca
Speed-up the Kalman filter computation
ArnaudDmt Jun 16, 2023
9eb0f81
add backup when fail
ArnaudDmt Jul 19, 2023
5bc29e4
fix test analyticial jacobians
ArnaudDmt Jul 20, 2023
cbcd1e2
[Tilt] add initializer and cov mult. bench. for KO
ArnaudDmt Aug 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .clang-format-common.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This script is meant to be sourced from other scripts

# Check for clang-format, prefer 6.0 if available
if [[ -x "$(command -v clang-format-6.0)" ]]; then
clang_format=clang-format-6.0
# Check for clang-format, prefer 10 if available
if [[ -x "$(command -v clang-format-10)" ]]; then
clang_format=clang-format-10
elif [[ -x "$(command -v clang-format)" ]]; then
clang_format=clang-format
else
echo "clang-format or clang-format-6.0 must be installed"
echo "clang-format or clang-format-10 must be installed"
exit 1
fi

Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
cmake-format:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install cmakelang
Expand All @@ -21,15 +21,13 @@ jobs:
./.cmake-format-check.sh
clang-format:
needs: cmake-format
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install clang-format-6.0
- name: Install clang-format-10
run: |
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get -qq update
sudo apt-get -qq remove clang-6.0 libclang1-6.0 libclang-common-6.0-dev libllvm6.0
sudo apt-get -qq install clang-format-6.0 clang-format
sudo apt-get -qq install clang-format-10
- name: Run clang-format-check
run: |
./.clang-format-check.sh
Expand All @@ -38,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-16.04, ubuntu-18.04, macos-latest, windows-latest]
os: [ubuntu-20.04, macos-latest, windows-latest]
build-type: [Debug, RelWithDebInfo, script]
compiler: [gcc, clang]
exclude:
Expand All @@ -47,13 +45,10 @@ jobs:
compiler: clang
- os: windows-latest
compiler: clang
- os: ubuntu-16.04
build-type: script
- os: ubuntu-18.04
- os: ubuntu-20.04
build-type: script
- os: macos-latest
build-type: script

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -97,7 +92,7 @@ jobs:
fi
- name: Upload documentation
# Only run on master branch and for one configuration
if: matrix.os == 'ubuntu-18.04' && matrix.build-type == 'RelWithDebInfo' && matrix.compiler == 'gcc' && github.ref == 'refs/heads/master'
if: matrix.os == 'ubuntu-20.04' && matrix.build-type == 'RelWithDebInfo' && matrix.compiler == 'gcc' && github.ref == 'refs/heads/master'
uses: jrl-umi3218/github-actions/upload-documentation@master
with:
GH_USER: gergondet
Expand All @@ -109,4 +104,4 @@ jobs:
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: '#ci'
slack-text: >
[mc_rtc] Build *${{ matrix.os }}/${{ matrix.build-type }} (${{ matrix.compiler }})* failed on ${{ github.ref }}
[state-observation] Build *${{ matrix.os }}/${{ matrix.build-type }} (${{ matrix.compiler }})* failed on ${{ github.ref }}
230 changes: 7 additions & 223 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,226 +18,10 @@ on:
tags:
- v*
jobs:
check-tag:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
if: startsWith(github.ref, 'refs/tags/')
- name: Check version coherency
run: |
set -x
export VERSION=`echo ${{ github.ref }} | sed -e 's@refs/tags/v@@'`
echo "REJECTION=PROJECT_VERSION in CMakeLists.txt does not match tag" >> $GITHUB_ENV
grep -q "set(PROJECT_VERSION ${VERSION})" CMakeLists.txt
echo "REJECTION=Upstream version in debian/changelog does not match tag" >> $GITHUB_ENV
head -n 1 debian/changelog | grep -q "state-observation (${VERSION}"
echo "REJECTION=" >> $GITHUB_ENV
export TAG=`echo ${{ github.ref }} | sed -e 's@refs/tags/@@'`
echo "RELEASE_TAG=${TAG}" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/')
- name: Delete tag
run: |
set -x
curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -X DELETE https://api.github.com/repos/${{ github.repository }}/git/${{ github.ref }}
if: failure()
- name: Notify tag deletion
uses: archive/github-actions-slack@master
with:
slack-bot-user-oauth-access-token: "${{ secrets.SLACK_BOT_TOKEN }}"
slack-channel: "#ci"
slack-text: |
Tag *${{ github.ref }}* in *${{ github.repository }}* was deleted:
${{ env.REJECTION}}
if: failure()
- name: Create release
uses: jrl-umi3218/github-actions/create-release@master
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
tag: "${{ env.RELEASE_TAG }}"
if: startsWith(github.ref, 'refs/tags/')
build-packages:
needs: check-tag
strategy:
fail-fast: false
matrix:
dist:
- xenial
- bionic
- focal
arch:
- i386
- amd64
exclude:
- dist: focal
arch: i386
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Choose extra mirror
run: |
# We upload in all conditions except when building on PR or branch other than master
export PACKAGE_UPLOAD=true
if ${{ startsWith(github.ref, 'refs/tags/') }}
then
export USE_HEAD=false
elif [ "${{ github.event.action }}" == "package-master" ]
then
export USE_HEAD=true
elif [ "${{ github.event.action }}" == "package-release" ]
then
export USE_HEAD=false
export REF=`git tag --sort=committerdate --list 'v[0-9]*'|tail -1`
git checkout $REF
git submodule sync && git submodule update
else
export REF=`echo ${{ github.ref }} | sed -e 's@refs/[a-z]*/@@'`
export USE_HEAD=true
if [ $REF != "master" ]
then
export PACKAGE_UPLOAD=false
fi
fi
if [ "${{ github.repository }}" != "jrl-umi3218/state-observation" ]
then
export PACKAGE_UPLOAD=false
fi
if $USE_HEAD
then
echo "CLOUDSMITH_REPO=mc-rtc/head" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-master" >> $GITHUB_ENV
else
echo "CLOUDSMITH_REPO=mc-rtc/stable" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-release" >> $GITHUB_ENV
fi
echo "PACKAGE_UPLOAD=${PACKAGE_UPLOAD}" >> $GITHUB_ENV
- name: Build package
uses: jrl-umi3218/github-actions/build-package-native@master
with:
dist: "${{ matrix.dist }}"
arch: "${{ matrix.arch }}"
cloudsmith-repo: "${{ env.CLOUDSMITH_REPO }}"
- uses: actions/upload-artifact@v1
with:
name: packages-${{ matrix.dist }}-${{ matrix.arch }}
path: "/tmp/packages-${{ matrix.dist }}-${{ matrix.arch }}/"
if: env.PACKAGE_UPLOAD == 'true'
upload-packages:
needs: build-packages
strategy:
max-parallel: 1
fail-fast: false
matrix:
dist:
- xenial
- bionic
- focal
arch:
- i386
- amd64
exclude:
- dist: focal
arch: i386
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Choose extra mirror
run: |
# We upload in all conditions except when building on PR or branch other than master
export PACKAGE_UPLOAD=true
if ${{ startsWith(github.ref, 'refs/tags/') }}
then
export USE_HEAD=false
elif [ "${{ github.event.action }}" == "package-master" ]
then
export USE_HEAD=true
elif [ "${{ github.event.action }}" == "package-release" ]
then
export USE_HEAD=false
export REF=`git tag --sort=committerdate --list 'v[0-9]*'|tail -1`
git checkout $REF
git submodule sync && git submodule update
else
export REF=`echo ${{ github.ref }} | sed -e 's@refs/[a-z]*/@@'`
export USE_HEAD=true
if [ $REF != "master" ]
then
export PACKAGE_UPLOAD=false
fi
fi
if [ "${{ github.repository }}" != "jrl-umi3218/state-observation" ]
then
export PACKAGE_UPLOAD=false
fi
if $USE_HEAD
then
echo "CLOUDSMITH_REPO=mc-rtc/head" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-master" >> $GITHUB_ENV
else
echo "CLOUDSMITH_REPO=mc-rtc/stable" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-release" >> $GITHUB_ENV
fi
echo "PACKAGE_UPLOAD=${PACKAGE_UPLOAD}" >> $GITHUB_ENV
- name: Download packages
uses: actions/download-artifact@v1
with:
name: packages-${{ matrix.dist }}-${{ matrix.arch }}
if: env.PACKAGE_UPLOAD == 'true'
- name: Upload
uses: jrl-umi3218/github-actions/upload-package@master
with:
dist: ubuntu/${{ matrix.dist }}
repo: "${{ env.CLOUDSMITH_REPO }}"
path: packages-${{ matrix.dist }}-${{ matrix.arch }}
CLOUDSMITH_API_KEY: "${{ secrets.CLOUDSMITH_API_KEY }}"
if: env.PACKAGE_UPLOAD == 'true'
mirror-sync-and-trigger:
needs: upload-packages
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Choose extra mirror
run: |
# We upload in all conditions except when building on PR or branch other than master
export PACKAGE_UPLOAD=true
if ${{ startsWith(github.ref, 'refs/tags/') }}
then
export USE_HEAD=false
elif [ "${{ github.event.action }}" == "package-master" ]
then
export USE_HEAD=true
elif [ "${{ github.event.action }}" == "package-release" ]
then
export USE_HEAD=false
export REF=`git tag --sort=committerdate --list 'v[0-9]*'|tail -1`
git checkout $REF
git submodule sync && git submodule update
else
export REF=`echo ${{ github.ref }} | sed -e 's@refs/[a-z]*/@@'`
export USE_HEAD=true
if [ $REF != "master" ]
then
export PACKAGE_UPLOAD=false
fi
fi
if $USE_HEAD
then
echo "CLOUDSMITH_REPO=mc-rtc/head" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-master" >> $GITHUB_ENV
else
echo "CLOUDSMITH_REPO=mc-rtc/stable" >> $GITHUB_ENV
echo "PACKAGE_JOB=package-release" >> $GITHUB_ENV
fi
echo "PACKAGE_UPLOAD=${PACKAGE_UPLOAD}" >> $GITHUB_ENV
- name: Trigger dependents rebuild
run: 'curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.GH_PAGES_TOKEN }}" --request POST --data "{\"event_type\": \"${PACKAGE_JOB}\"}" https://api.github.com/repos/jrl-umi3218/mc_rtc/dispatches

'
if: env.PACKAGE_UPLOAD == 'true'
package:
uses: jrl-umi3218/github-actions/.github/workflows/package-project.yml@master
with:
deps: '["jrl-umi3218/mc_rtc"]'
secrets:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
GH_TOKEN: ${{ secrets.GH_PAGES_TOKEN }}
Loading