Skip to content

Commit 7c4081d

Browse files
hummeltechpantierra
authored andcommitted
Added build & test on Fedora 34
* Takes about 3-5 minutes **Also:** * Split up `Lint` and `Build & Test` * Into independent workflows * Changed `.tar` compression to `GZip` * `--zstd` not available in `CentOS 7` * Also excluded `.git` & `.gitignore` * Created `Provisioning` local action * Combining update & install steps, etc. * Added libraries to `Ubuntu` build dependencies * `libmemcached-dev` & `librados-dev` * In order to test for successful compilation * ~~Reduced `build-archive` retention to 1 day~~ * Updated `ax_pthread` macro * While trying to resolve `apxs` failure * http://www.gnu.org/software/autoconf-archive/ax_pthread.html
1 parent ffda917 commit 7c4081d

14 files changed

Lines changed: 653 additions & 288 deletions

File tree

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
inputs:
33
packages:
4-
description: List of packages to install
4+
description: List of package(s) to install
55
required: true
66

77
runs:
88
using: composite
99
steps:
10-
- run: sudo apt --yes install ${{ inputs.packages }}
10+
- name: Install package(s)
11+
run: sudo apt --yes install ${{ inputs.packages }}
1112
shell: bash
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
inputs:
3+
packages:
4+
description: List of package(s) to install
5+
required: true
6+
7+
runs:
8+
using: composite
9+
steps:
10+
- name: Update installed packages
11+
uses: ./.github/actions/apt/update
12+
- name: Install package(s)
13+
uses: ./.github/actions/apt/install
14+
with:
15+
packages: ${{ inputs.packages }}

.github/actions/apt/update/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
runs:
33
using: composite
44
steps:
5-
- run: sudo apt --yes update
5+
- name: Update installed packages
6+
run: sudo apt --yes update
67
shell: bash

.github/actions/build-archive/create/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ runs:
44
steps:
55
- name: Create build archive
66
run: |
7-
tar --verbose --create --zstd \
8-
--file=/tmp/workspace.tar.zst \
7+
tar --verbose --create --gzip \
8+
--exclude=.git --exclude=.gitgnore \
9+
--file=/tmp/workspace.tar.gz \
910
*
1011
shell: bash
1112
working-directory: ${{ github.workspace }}/..

.github/actions/build-archive/extract/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ runs:
44
steps:
55
- name: Extract build archive
66
run: |
7-
tar --verbose --extract --zstd \
8-
--file=/tmp/workspace.tar.zst
7+
tar --verbose --extract --gzip \
8+
--file=/tmp/workspace.tar.gz
99
shell: bash
1010
working-directory: ${{ github.workspace }}/..
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
inputs:
3+
groups:
4+
description: List of group(s) to install
5+
required: true
6+
7+
runs:
8+
using: composite
9+
steps:
10+
- name: Install group(s)
11+
run: yum --assumeyes groups install ${{ inputs.groups }}
12+
shell: bash
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
inputs:
3+
packages:
4+
description: List of package(s) to install
5+
required: true
6+
7+
runs:
8+
using: composite
9+
steps:
10+
- name: Install package(s)
11+
run: yum --assumeyes install ${{ inputs.packages }}
12+
shell: bash
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
inputs:
3+
groups:
4+
description: List of group(s) to install
5+
required: false
6+
default: >-
7+
"Development Tools"
8+
packages:
9+
description: List of package(s) to install
10+
required: true
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Update installed packages
16+
uses: ./.github/actions/yum/update
17+
- name: Install group(s)
18+
uses: ./.github/actions/yum/groups-install
19+
with:
20+
groups: ${{ inputs.groups }}
21+
- name: Install package(s)
22+
uses: ./.github/actions/yum/install
23+
with:
24+
packages: ${{ inputs.packages }}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Update installed packages
6+
run: yum --assumeyes update
7+
shell: bash
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
name: Build & Test (Fedora 34)
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- master
9+
- develop
10+
11+
env:
12+
build-group-dependencies: >-
13+
"C Development Tools and Libraries"
14+
"Development Libraries"
15+
"Development Tools"
16+
build-dependencies: >-
17+
cairo-devel
18+
glib2-devel
19+
httpd-devel
20+
iniparser-devel
21+
libcurl-devel
22+
libmemcached-devel
23+
librados-devel
24+
mapnik-devel
25+
26+
jobs:
27+
build-and-test:
28+
name: Build & Test
29+
runs-on: ubuntu-latest
30+
container:
31+
image: fedora:34
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v2
35+
- name: Provision environment
36+
uses: ./.github/actions/yum/provision
37+
with:
38+
groups: ${{ env.build-group-dependencies }}
39+
packages: ${{ env.build-dependencies }} httpd
40+
- name: Run `./autogen.sh`
41+
run: ./autogen.sh
42+
- name: Run `./configure`
43+
run: ./configure
44+
- name: Run `make`
45+
run: make
46+
- name: Run `make test`
47+
run: make test
48+
- name: Configure Apache HTTP Server
49+
run: |
50+
mkdir --parents /usr/share/javascript/leaflet
51+
curl --silent \
52+
"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.js" \
53+
> /usr/share/javascript/leaflet/leaflet.min.js
54+
curl --silent \
55+
"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.css" \
56+
> /usr/share/javascript/leaflet/leaflet.css
57+
mkdir --parents /run/renderd /var/cache/renderd/tiles
58+
ln --symbolic \
59+
"${PWD}/utils/example-map" \
60+
/var/www/
61+
ln --symbolic \
62+
/usr/share/javascript/leaflet \
63+
/var/www/example-map/leaflet
64+
ln --symbolic \
65+
"${PWD}/etc/renderd/renderd.conf.examples" \
66+
/etc/renderd.conf
67+
ln --symbolic \
68+
"${PWD}/etc/apache2/renderd.conf" \
69+
/etc/httpd/conf.d/renderd.conf
70+
ln --symbolic \
71+
"${PWD}/etc/apache2/renderd-example-map.conf" \
72+
/etc/httpd/conf.d/renderd-example-map.conf
73+
echo "LoadModule tile_module /usr/lib64/httpd/modules/mod_tile.so" \
74+
| tee --append /etc/httpd/conf.modules.d/11-mod_tile.conf
75+
sed --in-place \
76+
"s#/usr/lib/mapnik/3.0/input#/usr/lib64/mapnik/input#g" \
77+
/etc/renderd.conf
78+
sed --in-place \
79+
"s#/usr/share/fonts/truetype#/usr/share/fonts#g" \
80+
/etc/renderd.conf
81+
rm --force /etc/httpd/conf.d/welcome.conf
82+
- name: Run `make install`
83+
run: make install
84+
- name: Run `make install-mod_tile`
85+
run: make install-mod_tile
86+
- name: Start `renderd`
87+
run: renderd
88+
- name: Start Apache HTTP Server
89+
run: httpd
90+
- name: Test Apache HTTP Server `mod_tile` module
91+
run: |
92+
curl --silent http://localhost/renderd-example/tiles/9/297/191.png \
93+
| sha224sum - \
94+
| grep 9cd82e5af9d9002a1c75126ebdb7bf054ec0b7ed0db228dfb0a09bae

0 commit comments

Comments
 (0)