Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: GitHub noreply@github.com Date: Sun, 13 Feb 2022 16:40:06 UTC Commit: f05e660c0318fcdb40531db07d61a94898343449 https://github.com/geany/geany-plugins/commit/f05e660c0318fcdb40531db07d61a9...
Log Message: ----------- Merge pull request #1159 from eht16/migrate_travis_to_gh_actions
Migrate from Travis CI to Github Actions
Modified Paths: -------------- .github/workflows/build.yml .travis.yml
Modified: .github/workflows/build.yml 175 lines changed, 175 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,175 @@ +# +# Copyright: 2022, The Geany contributors +# License: GNU GPL v2 or later + +name: CI Build + +on: + push: + branches: + - master + pull_request: + branches: + - master + +# cancel already running builds of the same branch or pull request +concurrency: + group: ci-${{ github.head_ref }} || concat(${{ github.ref }} + cancel-in-progress: true + +env: + CFLAGS: -g -O2 -Werror=pointer-arith -Werror=implicit-function-declaration + CONFIGURE_FLAGS: --disable-silent-rules + CCACHE_DIR: ${{ github.workspace }}/.ccache + CCACHE_COMPRESS: true + CCACHE_MAXSIZE: 1G + PYTHON: python3 + JOBS: 2 + DEBUG: 0 + +jobs: + linux: + name: Linux Build + runs-on: ubuntu-18.04 + + env: + CC: ccache gcc + CXX: ccache g++ + GEANY_SOURCE_PATH: ${{ github.workspace }}/.geany_source + GEANY_CACHE_PATH: ${{ github.workspace }}/.geany_cache + GEANY_INSTALLATION_PATH: ${{ github.workspace }}/.geany_cache/_geany_install + PKG_CONFIG_PATH: ${{ github.workspace }}/.geany_cache/_geany_install/lib/pkgconfig:$PKG_CONFIG_PATH + LD_LIBRARY_PATH: ${{ github.workspace }}/.geany_cache/_geany_install/lib:$LD_LIBRARY_PATH + + steps: + - name: Checkout Geany-Plugins + uses: actions/checkout@v2 + + - name: Checkout Geany + uses: actions/checkout@v2 + with: + repository: geany/geany + path: ${{ env.GEANY_SOURCE_PATH }} + token: ${{ github.token }} + + # create and use a timestamp for the cache key: GH Actions will never update a cache + # only use an existing cache item or create a new one. To use an existing cache *and* + # push back the the updated cache after build, we use a always new cache key (to force + # the creation of the cache item at the end) in combination with "restore-keys" as fallback + - name: Prepare ccache timestamp + id: ccache_cache_timestamp + run: echo "::set-output name=timestamp::$(date +%Y-%m-%d-%H-%M)" + + - name: Configure ccache + uses: actions/cache@v2 + with: + path: ${{ env.CCACHE_DIR }} + key: ${{ runner.os }}-${{ github.job }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} + restore-keys: ${{ runner.os }}-${{ github.job }}-ccache- + + - name: Prepare Geany Cache Key + id: prepare_geany_cache_key + working-directory: ${{ env.GEANY_SOURCE_PATH }} + run: echo "::set-output name=commit_hash::$(git rev-parse HEAD)" + + - name: Configure Geany Cache + id: geany_cache + uses: actions/cache@v2 + with: + path: ${{ env.GEANY_CACHE_PATH }} + key: ${{ runner.os }}-${{ github.job }}-geany-cache-${{ steps.prepare_geany_cache_key.outputs.commit_hash }} + + - name: Show environment + if: ${{ env.DEBUG == '1' }} + run: | + env | sort + + - name: Install Dependencies + run: | + sudo apt-get update --quiet --quiet + # write dependencies to a temporary file which is then fed to "apt-get install", + # so we can use comments in the dependency list + cat << EOF > $RUNNER_TEMP/dependencies + # general + ccache + libtool + libgtk-3-dev + # geany + autopoint + gettext + python-docutils + # geany-plugins + intltool + check + cppcheck + # debugger + libvte-2.91-dev + # devhelp + libwebkitgtk-dev + libwnck-dev + libgconf2-dev + zlib1g-dev + # geanygendoc + libctpl-dev + # geanylua + liblua5.1-0-dev + # geanypg + libgpgme-dev + # geanypy + python-dev + # geanyvc + libgtkspell-dev + libgtkspell3-3-dev + # geaniuspaste/updatechecker + libsoup2.4-dev + # git-changebar + libgit2-dev + # markdown + libmarkdown2-dev + # markdown/webhelper + libwebkitgtk-3.0-dev + # multiterm + valac + # pretty-printer + libxml2-dev + # spellcheck + libenchant-dev + EOF + grep -v '^[ ]*#' $RUNNER_TEMP/dependencies | xargs sudo apt-get install --assume-yes --no-install-recommends + + - name: Build Geany + if: steps.geany_cache.outputs.cache-hit != 'true' + run: | + cd "${{ env.GEANY_SOURCE_PATH }}" + NOCONFIGURE=1 ./autogen.sh + mkdir _build + cd _build + { ../configure --prefix="${{ env.GEANY_INSTALLATION_PATH }}" || { cat config.log; exit 1; } ; } + make -j ${{ env.JOBS }} + make -j ${{ env.JOBS }} install + + - name: Configure + run: | + NOCONFIGURE=1 ./autogen.sh + mkdir _build + cd _build + { ../configure $CONFIGURE_FLAGS || { cat config.log; exit 1; } ; } + + - name: Build + run: | + cd _build + make -j ${{ env.JOBS }} + + - name: Run Tests + run: | + cd _build + make -j ${{ env.JOBS }} check + + - name: Run distcheck + run: | + cd _build + make -j ${{ env.JOBS }} distcheck DISTCHECK_CONFIGURE_FLAGS="${{ env.CONFIGURE_FLAGS }}"; + + - name: ccache statistics + if: ${{ env.DEBUG == '1' }} + run: ccache --show-stats
Modified: .travis.yml 99 lines changed, 0 insertions(+), 99 deletions(-) =================================================================== @@ -1,99 +0,0 @@ -language: c -dist: bionic -sudo: false - -compiler: - - gcc - -cache: - ccache: true - directories: - - $HOME/geany/gtk3 - -addons: - apt: - packages: - - libgtk-3-dev - - intltool - - libtool - - python-docutils - - check - - cppcheck - # geany - - gettext autopoint - # debugger - - libvte-2.91-dev - # devhelp - - libwebkitgtk-dev - - libwnck-dev - - libgconf2-dev - - zlib1g-dev - # geanygendoc - - libctpl-dev - # geanylua - - liblua5.1-0-dev - # geanypg - - libgpgme11-dev - # geanypy - - python-dev - # geanyvc - - libgtkspell-dev - - libgtkspell3-3-dev - # geaniuspaste/updatechecker - - libsoup2.4-dev - # git-changebar - - libgit2-dev - # markdown - - libmarkdown2-dev - # markdown/webhelper - - libwebkitgtk-3.0-dev - # multiterm - - valac - # pretty-printer - - libxml2-dev - # spellcheck - - libenchant-dev - -before_install: - # build Geany - - TEMPDIR=$(mktemp -d) - - git clone git://github.com/geany/geany.git "$TEMPDIR/geany" - - geany_commit=$(cd "$TEMPDIR/geany" && git rev-parse HEAD) - - gtkver=gtk3 - - cachedir="$HOME/geany/$gtkver/" - - cache_id=$(cat "$cachedir/commit-id" 2>/dev/null || echo "none") - # check if the cache is up-to-date, and either use it, or (re-)create it - - > - if test "$geany_commit" = "$cache_id"; then - echo "Cache '$cachedir' looks good, using it (ID: $cache_id)."; - else - echo "Cache '$cachedir' is missing, outdated or invalid, dropping it."; - echo " Cache ID: $cache_id"; - echo " Geany ID: $geany_commit"; - rm "$cachedir" -rf || exit 1; - ( cd "$TEMPDIR/geany" && - NOCONFIGURE=1 ./autogen.sh && - ./configure --prefix="$cachedir" && - make -j2 && - make install || exit 1; - git rev-parse HEAD > "$cachedir/commit-id" || exit 2; - ) || exit $?; - fi - - test -z "$TEMPDIR" || rm -rf "$TEMPDIR" - - export PKG_CONFIG_PATH="$cachedir/lib/pkgconfig:$PKG_CONFIG_PATH" - - export LD_LIBRARY_PATH="$cachedir/lib:$LD_LIBRARY_PATH" - -before_script: - # prepare for GP - - export CFLAGS="-g -O2 -Werror=pointer-arith -Werror=implicit-function-declaration" - -script: - - NOCONFIGURE=1 ./autogen.sh - - mkdir _build && cd _build - - ../configure --disable-silent-rules - - make -j2 - - make -j2 check - - make -j2 distcheck - -after_script: - - test -z "$TEMPDIR" || rm -rf "$TEMPDIR"
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org