From f34d5bd062626d564e9b0570e900442caa45c0c8 Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Fri, 30 Jul 2021 11:10:12 +0200 Subject: [PATCH 1/2] Migrate CI from Travis to GitHub Workflows --- .github/workflows/ci.yml | 67 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 30 ------------------ README.md | 2 +- 3 files changed, 68 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d8abfec --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,67 @@ +name: CI + +on: + push: + pull_request: + schedule: + - cron: "0 12 * * 0" + +jobs: + build: + runs-on: ubuntu-latest + continue-on-error: true + + strategy: + fail-fast: false + matrix: + gtk_version: [2, 3] + include: + - gimp_git_tag: 'GIMP_2_10_22' + gtk_version: '' + + container: + image: photoflow/docker-centos7-gimp + env: + GTK_VERSION: ${{ matrix.gtk_version }} + GIMP_GIT_TAG: ${{ matrix.gimp_git_tag }} + BABL_GIT_TAG: 'BABL_0_1_82' + GEGL_GIT_TAG: 'GEGL_0_4_26' + + steps: + - name: checkout repository + uses: actions/checkout@v2 + + - name: build AppImage + run: | + ln -s "$PWD" /sources + exec /sources/mkappimage.sh + + - name: archive built artifacts + uses: actions/upload-artifact@v2 + with: + name: gimp-appimage + path: out/* + retention-days: 7 + + upload: + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + needs: build + runs-on: ubuntu-latest + steps: + - name: retrieve artifacts + uses: actions/download-artifact@v2 + with: + name: gimp-appimage + path: out/ + + - name: dump files + run: ls -lh out/ + + - name: retrieve upload tool + run: wget -c https://github.com/aferrero2707/uploadtool/raw/master/upload_rotate.sh + + - name: upload built files + run: bash ./upload_rotate.sh "continuous" out/* + env: + TRAVIS_REPO_SLUG: ${{ github.repository }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 73017b1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: generic -os: linux -dist: trusty -compiler: g++ -sudo: required -services: docker -env: - - GTK_VERSION=2 - - GTK_VERSION=3 - #- BABL_GIT_TAG=BABL_0_1_72 - #- GEGL_GIT_TAG=GEGL_0_4_18 - - GIMP_GIT_TAG=GIMP_2_10_22 - #- TARGET_SYSTEM=Linux - -before_script: - - travis_wait 120 sleep infinity & sudo docker pull photoflow/docker-centos7-gimp - #- sudo docker run -it -v $(pwd):/sources -e BABL_GIT_TAG="$BABL_GIT_TAG" -e GEGL_GIT_TAG="$GEGL_GIT_TAG" -e GIMP_GIT_TAG="$GIMP_GIT_TAG" photoflow/docker-trusty-gimp bash /sources/build-appimage.sh - #- sudo docker run -it -v $(pwd):/sources -e GTK_VERSION="${GTK_VERSION}" -e BABL_GIT_TAG="BABL_0_1_62" -e GEGL_GIT_TAG="GEGL_0_4_14" -e GIMP_GIT_TAG="$GIMP_GIT_TAG" photoflow/docker-centos7-gimp bash /sources/mkappimage.sh - - sudo docker run -it -v $(pwd):/sources -e GTK_VERSION="${GTK_VERSION}" -e BABL_GIT_TAG="BABL_0_1_82" -e GEGL_GIT_TAG="GEGL_0_4_26" -e GIMP_GIT_TAG="${GIMP_GIT_TAG}" photoflow/docker-centos7-gimp bash /sources/mkappimage.sh -after_success: - - cd $TRAVIS_BUILD_DIR - - ls -lh - - ls out/* - - wget -c https://github.com/aferrero2707/uploadtool/raw/master/upload_rotate.sh - - bash ./upload_rotate.sh "continuous" out/* >& /dev/null -branches: - except: - - # Do not build tags that we create when we upload to GitHub Releases - - /^(?i:continuous)$/ - - /^(?i:unstable)$/ diff --git a/README.md b/README.md index 730d6c9..c25af15 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/aferrero2707/gimp-appimage.svg?branch=master)](https://travis-ci.org/aferrero2707/gimp-appimage) +[![Build Status](https://github.com/aferrero2707/gimp-appimage/actions/workflows/ci.yml/badge.svg)](https://github.com/aferrero2707/gimp-appimage/actions/workflows/ci.yml) # Introduction From 7eb90365423086d6df76e5707945d5970cd22641 Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Fri, 30 Jul 2021 11:22:48 +0200 Subject: [PATCH 2/2] fix: run upload job on schedule --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8abfec..3578d8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: retention-days: 7 upload: - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'schedule' }} needs: build runs-on: ubuntu-latest steps: