Skip to content

Commit aea00a0

Browse files
committed
Add github action to build on Linux
1 parent 533f240 commit aea00a0

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/linux.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
apt-get update
6+
7+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
8+
gcc libxml2-dev libpq-dev libfcgi-dev \
9+
autoconf make flex libfl-dev \
10+
postgresql-12 postgresql-client postgis postgresql-12-postgis-3 postgresql-12-postgis-3-scripts \
11+
wget ca-certificates patch valgrind
12+
13+
cd "${WORK_DIR}"
14+
./autogen.sh
15+
CFLAGS="-Werror" ./configure
16+
make
17+
make install
18+
19+
cp /etc/postgresql/12/main/pg_hba.conf /etc/postgresql/12/main/pg_hba.conf.bak
20+
echo "local all postgres trust" | cat - /etc/postgresql/12/main/pg_hba.conf.bak > /etc/postgresql/12/main/pg_hba.conf
21+
echo "host all all 127.0.0.1/32 trust" | cat - /etc/postgresql/12/main/pg_hba.conf.bak > /etc/postgresql/12/main/pg_hba.conf
22+
/etc/init.d/postgresql start
23+
24+
make install-demo
25+
26+
# wget https://github.com/MapServer/tinyows/commit/633ca487113d032e261a4a5c8b5f3b7850580f4f.patch
27+
# patch -p1 -R < 633ca487113d032e261a4a5c8b5f3b7850580f4f.patch
28+
29+
# rm -f /etc/tinyows.xml
30+
# make install-test100
31+
32+
# rm -f /etc/tinyows.xml
33+
# make install-test110

.github/workflows/linux.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Linux build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
7+
linux_build:
8+
runs-on: ubuntu-latest
9+
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
14+
- name: Build
15+
run: docker run --rm -e WORK_DIR=$PWD -v $PWD:$PWD ubuntu:20.04 $PWD/.github/workflows/linux.sh

0 commit comments

Comments
 (0)