Add workflows
This commit is contained in:
parent
6c07678b64
commit
6153a88da2
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
# See:
|
||||||
|
# - https://forgejo.org/docs/latest/user/actions/
|
||||||
|
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
# Build on each push
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
env:
|
||||||
|
RETENTION_DAYS: 3
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: docker
|
||||||
|
# Not using a matrix to keep things simple and reuse steps in this CI
|
||||||
|
steps:
|
||||||
|
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
|
- run: apt-get -y update
|
||||||
|
- run: apt-get -y install --no-install-recommends intltool libcaja-extension-dev libnautilus-extension-dev
|
||||||
|
- run: test -d caja && test -d nautilus
|
||||||
|
- run: cd caja && ./bootstrap.sh
|
||||||
|
- run: cd nautilus && ./bootstrap.sh
|
||||||
|
- run: cd caja && ./configure && make
|
||||||
|
- run: cd nautilus && ./configure && make
|
|
@ -0,0 +1,135 @@
|
||||||
|
---
|
||||||
|
# See:
|
||||||
|
# - https://forgejo.org/docs/latest/user/actions/
|
||||||
|
|
||||||
|
name: Package
|
||||||
|
|
||||||
|
# FIXME: Currently build fails on the rpm/fedora job
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
# releases only
|
||||||
|
tags:
|
||||||
|
- '1*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
RETENTION_DAYS: 3
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Package tarball, we can work from there without relying on node (actions)
|
||||||
|
tarball:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
|
- run: test -d caja && test -d nautilus
|
||||||
|
- run: apt-get -y update
|
||||||
|
- run: apt-get -y install --no-install-recommends intltool libcaja-extension-dev libnautilus-extension-dev
|
||||||
|
- run: cd caja && ./bootstrap.sh
|
||||||
|
- run: cd nautilus && ./bootstrap.sh
|
||||||
|
- run: cd caja && ./configure
|
||||||
|
- run: cd nautilus && ./configure
|
||||||
|
- run: cd caja && make dist
|
||||||
|
- run: cd nautilus && make dist
|
||||||
|
# Artifact handling via upload/download
|
||||||
|
# - actions: https://code.forgejo.org/actions/upload-artifact
|
||||||
|
# https://code.forgejo.org/actions/download-artifact
|
||||||
|
# - reference example: https://code.forgejo.org/forgejo/end-to-end/src/branch/main/actions/example-artifacts/.forgejo/workflows/test.yml
|
||||||
|
# v4 is not supported in forgejo
|
||||||
|
- name: 'Upload tarball: caja'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: 'caja-tarball'
|
||||||
|
path: 'caja/caja-follow-symlink*.tar*'
|
||||||
|
# If not specified will use the server-configured value (90 by default)
|
||||||
|
retention-days: ${{ env.RETENTION_DAYS }}
|
||||||
|
- name: 'Upload tarball: nautilus'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: 'nautilus-tarball'
|
||||||
|
path: 'nautilus/nautilus-follow-symlink*.tar*'
|
||||||
|
retention-days: ${{ env.RETENTION_DAYS }}
|
||||||
|
# Leverage we're running on Debian to build and package deb
|
||||||
|
build-deb:
|
||||||
|
name: Build deb (and test-build)
|
||||||
|
needs: tarball
|
||||||
|
runs-on: docker
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
variant: ['caja', 'nautilus']
|
||||||
|
steps:
|
||||||
|
- name: Download all artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.variant }}-tarball
|
||||||
|
# no path specified => workspace
|
||||||
|
# Figure out the version used in tarballs and directories
|
||||||
|
#- run: grep AC_INIT nautilus-*/configure.ac | sed -r 's/^.*\[(.*)].*/\1/'
|
||||||
|
- id: version
|
||||||
|
run: >
|
||||||
|
echo 'version='$( \
|
||||||
|
ls *.tar.gz \
|
||||||
|
| awk -F - '{print $NF}' \
|
||||||
|
| sed 's/.tar.gz$//' \
|
||||||
|
) >> $GITHUB_OUTPUT
|
||||||
|
- id: dir
|
||||||
|
run: |
|
||||||
|
echo 'name=${{ matrix.variant }}-follow-symlink-${{ steps.version.outputs.version }}' >> $GITHUB_OUTPUT
|
||||||
|
- run: tar xvf ${{ steps.dir.outputs.name }}.tar.gz
|
||||||
|
- run: echo ${{ steps.dir.outputs.name }} ; ls -l ${{ steps.dir.outputs.name }}
|
||||||
|
- run: apt-get update
|
||||||
|
# Build-deps
|
||||||
|
- run: >
|
||||||
|
apt-get -y install --no-install-recommends lib${{ matrix.variant }}-extension-dev intltool debhelper devscripts build-essential
|
||||||
|
- run: cd '${{ steps.dir.outputs.name }}' && ./configure
|
||||||
|
# The deb package will compile but it may/will override flags
|
||||||
|
# Let the CI workflow handle that
|
||||||
|
#- name: Test compilation with default flags
|
||||||
|
# run: cd '${{ steps.dir.outputs.name }}' && make
|
||||||
|
- name: Build deb package
|
||||||
|
run: cd '${{ steps.dir.outputs.name }}' && debuild -us -uc -b
|
||||||
|
- name: Upload deb artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: '${{ matrix.variant }}-deb'
|
||||||
|
path: '${{ matrix.variant }}-follow-symlink_*'
|
||||||
|
retention-days: ${{ env.RETENTION_DAYS }}
|
||||||
|
build-rpm:
|
||||||
|
name: Build rpm
|
||||||
|
needs: tarball
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: 'fedora:latest'
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
variant: ['caja', 'nautilus']
|
||||||
|
steps:
|
||||||
|
# Can't run actions without node and git
|
||||||
|
- name: Prepare to run actions
|
||||||
|
run: dnf install -y nodejs git
|
||||||
|
- run: git --version && node --version
|
||||||
|
- name: Download all artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.variant }}-tarball
|
||||||
|
# no path specified => workspace
|
||||||
|
# Figure out the version used in tarballs and directories
|
||||||
|
#- run: grep AC_INIT nautilus-*/configure.ac | sed -r 's/^.*\[(.*)].*/\1/'
|
||||||
|
- id: version
|
||||||
|
run: >
|
||||||
|
echo 'version='$( \
|
||||||
|
ls *.tar.gz \
|
||||||
|
| awk -F - '{print $NF}' \
|
||||||
|
| sed 's/.tar.gz$//' \
|
||||||
|
) >> $GITHUB_OUTPUT
|
||||||
|
- id: dir
|
||||||
|
run: |
|
||||||
|
echo 'name=${{ matrix.variant }}-follow-symlink-${{ steps.version.outputs.version }}' >> $GITHUB_OUTPUT
|
||||||
|
- run: dnf install -y rpm-build intltool libtool ${{ matrix.variant }}-devel
|
||||||
|
- run: rpmbuild -tb '${{ steps.dir.outputs.name }}.tar.gz'
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: '${{ matrix.variant }}-rpm'
|
||||||
|
path: '~/rpmbuild/RPMS/*'
|
||||||
|
retention-days: ${{ env.RETENTION_DAYS }}
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Files produced during deb packaging
|
||||||
|
/*.deb
|
||||||
|
/*.ddeb
|
||||||
|
/*.build
|
||||||
|
/*.buildinfo
|
||||||
|
/*.changes
|
||||||
|
|
||||||
|
/*/debian/files
|
||||||
|
/*/debian/.debhelper
|
||||||
|
/*/debian/*-follow-symlink/
|
||||||
|
/*/debian/*.substvars
|
||||||
|
/*/debian/*.log
|
||||||
|
|
||||||
|
build-stamp
|
||||||
|
configure-stamp
|
|
@ -1,4 +1,9 @@
|
||||||
|
caja-follow-symlink-*.tar.gz
|
||||||
|
|
||||||
|
# results of patching via bootstrap.sh
|
||||||
ltmain.sh.orig
|
ltmain.sh.orig
|
||||||
|
ltmain.sh.rej
|
||||||
|
|
||||||
# autogenerated:
|
# autogenerated:
|
||||||
libtool
|
libtool
|
||||||
m4/
|
m4/
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
|
nautilus-follow-symlink-*.tar.gz
|
||||||
|
|
||||||
|
# results of patching via bootstrap.sh
|
||||||
ltmain.sh.orig
|
ltmain.sh.orig
|
||||||
|
ltmain.sh.rej
|
||||||
|
|
||||||
# autogenerated:
|
# autogenerated:
|
||||||
libtool
|
libtool
|
||||||
m4/
|
m4/
|
||||||
|
|
Loading…
Reference in New Issue