diff --git a/.forgejo/workflows/ci-build.yaml b/.forgejo/workflows/ci-build.yaml new file mode 100644 index 0000000..8a88a51 --- /dev/null +++ b/.forgejo/workflows/ci-build.yaml @@ -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 diff --git a/.forgejo/workflows/package-tagged-releases.yaml b/.forgejo/workflows/package-tagged-releases.yaml new file mode 100644 index 0000000..a0b3729 --- /dev/null +++ b/.forgejo/workflows/package-tagged-releases.yaml @@ -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 }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1fc4a4b --- /dev/null +++ b/.gitignore @@ -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 diff --git a/caja/.gitignore b/caja/.gitignore index 44862fa..f683819 100644 --- a/caja/.gitignore +++ b/caja/.gitignore @@ -1,4 +1,9 @@ +caja-follow-symlink-*.tar.gz + +# results of patching via bootstrap.sh ltmain.sh.orig +ltmain.sh.rej + # autogenerated: libtool m4/ diff --git a/nautilus/.gitignore b/nautilus/.gitignore index 44862fa..7bcb5e2 100644 --- a/nautilus/.gitignore +++ b/nautilus/.gitignore @@ -1,4 +1,9 @@ +nautilus-follow-symlink-*.tar.gz + +# results of patching via bootstrap.sh ltmain.sh.orig +ltmain.sh.rej + # autogenerated: libtool m4/