2 # Copyright: 2021, The Geany contributors
3 # License: GNU GPL v2 or later
15 # cancel already running builds of the same branch or pull request
17 group: ci-${{ github.head_ref }} || concat(${{ github.ref }}
18 cancel-in-progress: true
21 CFLAGS: -g -O2 -Werror=pointer-arith -Werror=implicit-function-declaration
22 CCACHE_DIR: ${{ github.workspace }}/.ccache
30 name: Linux Build (BINRELOC=${{ matrix.binreloc }})
41 CONFIGURE_FLAGS: --enable-binreloc=${{ matrix.binreloc }}
46 - uses: actions/checkout@v2
48 # create and use a timestamp for the cache key: GH Actions will never update a cache
49 # only use an existing cache item or create a new one. To use an existing cache *and*
50 # push back the the updated cache after build, we use a always new cache key (to force
51 # the creation of the cache item at the end) in combination with "restore-keys" as fallback
52 - name: Prepare ccache timestamp
53 id: ccache_cache_timestamp
54 run: echo "::set-output name=timestamp::$(date +%Y-%m-%d-%H-%M)"
56 - name: Configure ccache
57 uses: actions/cache@v2
59 path: ${{ env.CCACHE_DIR }}
60 key: ${{ runner.os }}-${{ github.job }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
61 restore-keys: ${{ runner.os }}-${{ github.job }}-ccache-
63 - name: Show environment
65 if: ${{ env.DEBUG == '1' }}
67 - name: Install dependencies
69 sudo apt-get update -qq
70 sudo apt-get install --assume-yes --no-install-recommends \
82 NOCONFIGURE=1 ./autogen.sh
85 { ../configure $CONFIGURE_FLAGS || { cat config.log; exit 1; } ; }
100 make -j2 distcheck DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_FLAGS";
102 - name: ccache statistics
103 run: ccache --show-stats
104 if: ${{ env.DEBUG == '1' }}
109 # i686-w64-mingw32-pkg-config fails with weird error message on 20.04
110 runs-on: ubuntu-18.04
112 CC: ccache i686-w64-mingw32-gcc
113 CXX: ccache i686-w64-mingw32-g++
116 - uses: actions/checkout@v2
118 # create and use a timestamp for the cache key: GH Actions will never update a cache
119 # only use an existing cache item or create a new one. To use an existing cache *and*
120 # push back the the updated cache after build, we use a always new cache key (to force
121 # the creation of the cache item at the end) in combination with "restore-keys" as fallback
122 - name: Prepare ccache timestamp
123 id: ccache_cache_timestamp
124 run: echo "::set-output name=timestamp::$(date +%Y-%m-%d-%H-%M)"
126 - name: Configure ccache
127 uses: actions/cache@v2
129 path: ${{ env.CCACHE_DIR }}
130 key: ${{ runner.os }}-${{ github.job }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
131 restore-keys: ${{ runner.os }}-${{ github.job }}-ccache-
133 - name: Show environment
135 if: ${{ env.DEBUG == '1' }}
137 - name: Install dependencies
139 sudo apt-get update -qq
140 sudo apt-get install --assume-yes --no-install-recommends \
147 binutils-mingw-w64-i686 \
152 # fix broken pkg-config-crosswrapper, see https://bugs.launchpad.net/ubuntu/+source/mingw-w64/+bug/1327242
153 sudo sed -e 's/PKG_CONFIG_PATH=/&$PKG_CONFIG_PATH:/' -i /usr/bin/i686-w64-mingw32-pkg-config
155 - name: Run autogen.sh
157 NOCONFIGURE=1 ./autogen.sh
161 sh ./scripts/cross-build-mingw.sh;
163 - name: ccache statistics
164 run: ccache --show-stats
165 if: ${{ env.DEBUG == '1' }}