Skip to content

Commit

Permalink
ci: updated ci
Browse files Browse the repository at this point in the history
  • Loading branch information
hanskw-weston committed Apr 2, 2024
1 parent 257181c commit ce1cd7d
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 0 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: default

on:
push:
branches:
- "**"
- "!main"
pull_request:
branches:
- "**"

env:
VERSION: "1.2.*"

jobs:
build:
strategy:
matrix:
container:
[
"westonrobot/ubuntu:focal-ci-latest",
"westonrobot/ubuntu:jammy-ci-latest",
"westonrobot/debian:bullseye-ci-latest",
]
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.GIT_REPO_SSH_KEY }}
submodules: recursive
path: "colcon_ws/src"
- name: Install boost
run: |
apt-get update && apt-get -y install libboost-all-dev
- name: Install latest wrp_sdk
run: |
sudo apt-get update
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL http://deb.westonrobot.net/signing.key | sudo gpg --dearmor -o /etc/apt/keyrings/weston-robot.gpg
sudo chmod a+r /etc/apt/keyrings/weston-robot.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/weston-robot.gpg] http://deb.westonrobot.net/$(lsb_release -cs) $(lsb_release -cs) main" | \
sudo tee /etc/apt/sources.list.d/weston-robot.list > /dev/null
sudo apt-get update
apt-get update && apt-get -y install wrp-sdk=${{ env.VERSION }}
- name: Install LelyCAN
if: |
!contains( matrix.container , 'debian' )
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:lely/ppa && sudo apt-get update
sudo apt-get install -y pkg-config liblely-coapp-dev liblely-co-tools
- name: Install LelyCAN (debian)
if: |
contains( matrix.container , 'debian' )
run: |
sudo apt-get update
sudo apt-get install -y \
git build-essential automake libtool \
python3-setuptools python3-wheel \
python3-empy python3-yaml \
libbluetooth-dev \
valgrind \
pkg-config \
doxygen graphviz
git clone https://gitlab.com/lely_industries/lely-core.git
cd lely-core
autoreconf -i
mkdir -p build && cd build
../configure --disable-cython
make
sudo make install
- name: Install Libmodbus
run: |
apt-get install -y libmodbus-dev
- name: Build samples
run: |
mkdir build
cd build
cmake .. && make
24 changes: 24 additions & 0 deletions .github/workflows/release-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: release-github

on:
push:
tags:
- "*"
workflow_dispatch:

env:
CONAN_USER: ${{ secrets.ARTIFACTORY_CONAN_USERNAME }}
CONAN_TOKEN: ${{ secrets.ARTIFACTORY_CONAN_ACCESS_TOKEN }}

jobs:
release:
runs-on: ubuntu-latest
container:
image: "westonrobot/ubuntu:jammy-ci-latest"
permissions:
contents: write
steps:
- name: Create release
uses: westonrobot-dev/release-action@v1.13.0
with:
generateReleaseNotes: true
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: release

on:
push:
branches:
- 'main'

env:
VERSION: "1.2.*"

jobs:
tag-release:
runs-on: ubuntu-latest
container:
image: "westonrobot/ubuntu:jammy-ci-latest"
steps:
- name: Create tag
continue-on-error: true
if: github.ref_name == 'main'
uses: westonrobot-dev/github-tag-action@v6.1
id: tag_version
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ env.VERSION }}
release_branches: "main"
pre_release_branches: "prerelease"
- name: Create Github Release
if: github.ref_name == 'main' && (steps.tag_version.outcome == 'success')
uses: westonrobot-dev/workflow-dispatch@v1.2.2
with:
workflow: release-github.yml
ref: ${{ steps.tag_version.outputs.new_tag }}

0 comments on commit ce1cd7d

Please sign in to comment.