added rod names for strain gauges and changed range #212
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: Generate cantools | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- "networks/**" | |
- ".github/**" | |
branches: | |
- master | |
jobs: | |
library: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- uses: actions/setup-python@v3 | |
name: Set up Python 3.10 | |
with: | |
python-version: "3.10" | |
- name: Run cantools generator | |
run: | | |
pip install git+https://github.com/eagletrt/cantools.git | |
cantools generate_c_source --use-float --generate-dbc --infolder networks -o . | |
g++ -fsyntax-only $(find ./lib -name "*.[ch]") | |
mkdir -p /tmp/workspace-evo | |
cp -R networks lib proto dbc /tmp/workspace-evo | |
- uses: actions/checkout@v2 | |
with: | |
ref: build-evo | |
- name: Push generated includes | |
id: commit | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git rm -r --ignore-unmatch */* | |
rm -rf * | |
cp -r /tmp/workspace-evo/* . | |
git add . | |
if [[ $(git status --porcelain) ]]; then git commit -am "chore: automatically generated files" && git push; fi | |
echo "::set-output name=HASH::$(git rev-parse HEAD)" | |
- name: Send telegram message | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ secrets.TELEGRAM_TO }} | |
token: ${{ secrets.TELEGRAM_TOKEN }} | |
message: | | |
CAN was updated using cantools generator (branch build-evo)! 🔥 | |
${{ github.actor }} created commit: ${{ github.event.commits[0].message }} | |
See changes: https://github.com/${{ github.repository }}/commit/${{steps.commit.outputs.HASH }} |