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' }}
106 name: Linux Meson Build
107 runs-on: ubuntu-20.04
117 - uses: actions/checkout@v2
119 # create and use a timestamp for the cache key: GH Actions will never update a cache
120 # only use an existing cache item or create a new one. To use an existing cache *and*
121 # push back the the updated cache after build, we use a always new cache key (to force
122 # the creation of the cache item at the end) in combination with "restore-keys" as fallback
123 - name: Prepare ccache timestamp
124 id: ccache_cache_timestamp
125 run: echo "::set-output name=timestamp::$(date +%Y-%m-%d-%H-%M)"
127 - name: Configure ccache
128 uses: actions/cache@v2
130 path: ${{ env.CCACHE_DIR }}
131 key: ${{ runner.os }}-${{ github.job }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
132 restore-keys: ${{ runner.os }}-${{ github.job }}-ccache-
134 - name: Show environment
136 if: ${{ env.DEBUG == '1' }}
138 - name: Install dependencies
140 sudo apt-get update -qq
141 sudo apt-get install --assume-yes --no-install-recommends \
152 - name: Configuration
164 # distcheck not applicable, meson exports the source tree per git-archive
166 - name: ccache statistics
167 run: ccache --show-stats
168 if: ${{ env.DEBUG == '1' }}
172 # i686-w64-mingw32-pkg-config fails with weird error message on 20.04
173 runs-on: ubuntu-18.04
175 CC: ccache i686-w64-mingw32-gcc
176 CXX: ccache i686-w64-mingw32-g++
179 - uses: actions/checkout@v2
181 # create and use a timestamp for the cache key: GH Actions will never update a cache
182 # only use an existing cache item or create a new one. To use an existing cache *and*
183 # push back the the updated cache after build, we use a always new cache key (to force
184 # the creation of the cache item at the end) in combination with "restore-keys" as fallback
185 - name: Prepare ccache timestamp
186 id: ccache_cache_timestamp
187 run: echo "::set-output name=timestamp::$(date +%Y-%m-%d-%H-%M)"
189 - name: Configure ccache
190 uses: actions/cache@v2
192 path: ${{ env.CCACHE_DIR }}
193 key: ${{ runner.os }}-${{ github.job }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
194 restore-keys: ${{ runner.os }}-${{ github.job }}-ccache-
196 - name: Show environment
198 if: ${{ env.DEBUG == '1' }}
200 - name: Install dependencies
202 sudo apt-get update -qq
203 sudo apt-get install --assume-yes --no-install-recommends \
210 binutils-mingw-w64-i686 \
215 # fix broken pkg-config-crosswrapper, see https://bugs.launchpad.net/ubuntu/+source/mingw-w64/+bug/1327242
216 sudo sed -e 's/PKG_CONFIG_PATH=/&$PKG_CONFIG_PATH:/' -i /usr/bin/i686-w64-mingw32-pkg-config
218 - name: Run autogen.sh
220 NOCONFIGURE=1 ./autogen.sh
224 sh ./scripts/cross-build-mingw.sh;
226 - name: ccache statistics
227 run: ccache --show-stats
228 if: ${{ env.DEBUG == '1' }}