Skip to content

c-cpp.yml: Update

c-cpp.yml: Update #75

Workflow file for this run

name: Release
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
on:
pull_request:
branches: master
workflow_dispatch:
inputs:
version:
description: 'version number'
required: true
type: string
env:
VERSION: ${{ inputs.version }}
jobs:
dist:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Install dependencies
run: |
sudo apt install -y \
meson \
ninja-build \
xz-utils
- name:
run: |
meson setup builddir
cd builddir
meson dist --include-subprojects
cd meson-dist
REL_TAR="rmw-${VERSION}.tar"
xz -d ${REL_TAR}.xz
tar --delete -f ${REL_TAR} rmw-${VERSION}/packaging
xz ${REL_TAR}
sha256sum ${REL_TAR}.xz > ${REL_TAR}.xz.sha256sum
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: rmw_dist_archive
path: ${{ github.workspace }}/builddir/meson-dist/*
build-appimage:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
- linux/arm/v7
env:
VERSION: ${{ inputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false
- if: ${{ ! contains(matrix.platform, 'amd64') }}
uses: docker/setup-qemu-action@v3
- name: Set variables
run: |
if [ -z "$VERSION" ]; then
echo "VERSION=${{ github.sha }}" >> $GITHUB_ENV
fi
- name: Build AppImage
run: |
docker run -t \
--rm \
--platform=${{ matrix.platform }} \
-e HOSTUID=$(id -u) \
-e VERSION \
-v $GITHUB_WORKSPACE:/workspace \
-w /workspace \
andy5995/linuxdeploy:latest packaging/appimage/pre-appimage.sh
- name: Create sha256sum
run: |
IMAGE_FILENAME=$(basename `find out/*AppImage`)
echo "IMAGE_FILENAME=$IMAGE_FILENAME" >> $GITHUB_ENV
cd out
sha256sum "$IMAGE_FILENAME" > "$IMAGE_FILENAME.sha256sum"
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: ${{ env.IMAGE_FILENAME }}
path: ./out/*
if-no-files-found: error
build-deb:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Copy debian directory
run: cp -a packaging/debian .
- uses: legoktm/gh-action-build-deb@debian-bullseye
id: build-debian-bullseye
with:
args: --no-sign
sources: deb http://deb.debian.org/debian bullseye-backports main
- name: Create sha256sum
run: |
cd output
sha256sum rmw_${VERSION}_amd64.deb > ../rmw_${VERSION}_amd64.deb.sha256sum
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: rmw_debian_pkg
path: |
output/*.deb
*deb.sha256sum
if-no-files-found: error