aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2020-12-13 15:30:47 +0100
committerKristian Evers <kristianevers@gmail.com>2020-12-13 15:30:47 +0100
commitc3efbd23a5bf26f1dfd5bc55ae3488d5665ace98 (patch)
treea204df79f7057d7d420bf7c5358791347617b9cd /.github/workflows
parent126445148d3b742c7f4e31f5f65857be59c48340 (diff)
parent6857d1a4a8eb6fcb7b88b0339413913ba2c3351a (diff)
downloadPROJ-c3efbd23a5bf26f1dfd5bc55ae3488d5665ace98.tar.gz
PROJ-c3efbd23a5bf26f1dfd5bc55ae3488d5665ace98.zip
Merge remote-tracking branch 'osgeo/master'
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/backport.yml4
-rw-r--r--.github/workflows/clang_linux.yml24
-rwxr-xr-x.github/workflows/clang_linux/start.sh32
-rw-r--r--.github/workflows/clang_static_analyzer.yml15
-rwxr-xr-x.github/workflows/clang_static_analyzer/start.sh46
-rw-r--r--.github/workflows/code_checks.yml20
-rw-r--r--.github/workflows/conda.yml3
-rw-r--r--.github/workflows/doc_build.yml2
-rw-r--r--.github/workflows/linux_gcc_32bit.yml24
-rwxr-xr-x.github/workflows/linux_gcc_32bit/start.sh56
-rw-r--r--.github/workflows/linux_gcc_4_8.yml29
-rwxr-xr-x.github/workflows/linux_gcc_4_8/start.sh55
-rw-r--r--.github/workflows/mac.yml39
-rwxr-xr-x.github/workflows/mac/before_install.sh13
-rwxr-xr-x.github/workflows/mac/install.sh13
-rw-r--r--.github/workflows/mingw_w64.yml24
-rwxr-xr-x.github/workflows/mingw_w64/start.sh118
-rw-r--r--.github/workflows/windows.yml62
18 files changed, 575 insertions, 4 deletions
diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml
index aa48cff3..f937c2ce 100644
--- a/.github/workflows/backport.yml
+++ b/.github/workflows/backport.yml
@@ -11,8 +11,8 @@ jobs:
name: Backport
steps:
- name: Backport Bot
- if: contains( join(github.event.pull_request.labels.*.name), 'backport')
- uses: Gaurav0/backport@v1.0.24
+ if: github.event.pull_request.merged && ( ( github.event.action == 'closed' && contains( join( github.event.pull_request.labels.*.name ), 'backport') ) || contains( github.event.label.name, 'backport' ) )
+ uses: Gaurav0/backport@v1.0.26
with:
bot_username: PROJ-BOT
bot_token: c1c49a5799d0a3a3885db8a4792880cbe509c1d6
diff --git a/.github/workflows/clang_linux.yml b/.github/workflows/clang_linux.yml
new file mode 100644
index 00000000..ba52cc95
--- /dev/null
+++ b/.github/workflows/clang_linux.yml
@@ -0,0 +1,24 @@
+name: CLang Linux
+
+on: [push, pull_request]
+
+jobs:
+
+ clang_linux:
+ runs-on: ubuntu-latest
+ if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Cache
+ uses: actions/cache@v2
+ id: cache
+ with:
+ path: |
+ ${{ github.workspace }}/ccache.tar.gz
+ key: ${{ runner.os }}-cache-clang-${{ github.run_id }}
+ restore-keys: ${{ runner.os }}-cache-clang-
+
+ - name: Run
+ run: docker run -e CI -e TRAVIS_BUILD_DIR="$PWD" -e WORK_DIR="$PWD" -e TRAVIS_OS_NAME=linux -e BUILD_NAME=linux_clang -v $PWD:$PWD ubuntu:20.04 $PWD/.github/workflows/clang_linux/start.sh
diff --git a/.github/workflows/clang_linux/start.sh b/.github/workflows/clang_linux/start.sh
new file mode 100755
index 00000000..83d2f8c2
--- /dev/null
+++ b/.github/workflows/clang_linux/start.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+set -e
+
+apt-get update -y
+DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+ sudo autoconf automake libtool clang++-10 python3-clang-10 make cmake ccache pkg-config tar zip \
+ sqlite3 libsqlite3-dev libtiff-dev libcurl4-openssl-dev jq python3-pip
+
+pip3 install --user jsonschema
+
+cd "$WORK_DIR"
+
+if test -f "$WORK_DIR/ccache.tar.gz"; then
+ echo "Restoring ccache..."
+ (cd $HOME && tar xzf "$WORK_DIR/ccache.tar.gz")
+fi
+
+export CCACHE_CPP2=yes
+export PROJ_DB_CACHE_DIR="$HOME/.ccache"
+
+ccache -M 500M
+ccache -s
+
+# -fno-use-cxa-atexit is needed to build with -coverage
+CC="ccache clang-10" CXX="ccache clang++-10" CFLAGS="-Werror -fsanitize=address -fno-use-cxa-atexit" CXXFLAGS="-Werror -fsanitize=address -fno-use-cxa-atexit" LDFLAGS="-fsanitize=address" ./travis/install.sh
+
+ccache -s
+
+echo "Saving ccache..."
+rm -f "$WORK_DIR/ccache.tar.gz"
+(cd $HOME && tar czf "$WORK_DIR/ccache.tar.gz" .ccache)
diff --git a/.github/workflows/clang_static_analyzer.yml b/.github/workflows/clang_static_analyzer.yml
new file mode 100644
index 00000000..47dfc4ad
--- /dev/null
+++ b/.github/workflows/clang_static_analyzer.yml
@@ -0,0 +1,15 @@
+name: CLang Static Analyzer
+
+on: [push, pull_request]
+
+jobs:
+
+ clang_static_analyzer:
+ runs-on: ubuntu-16.04
+ if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Run
+ run: .github/workflows/clang_static_analyzer/start.sh
diff --git a/.github/workflows/clang_static_analyzer/start.sh b/.github/workflows/clang_static_analyzer/start.sh
new file mode 100755
index 00000000..3a06c46a
--- /dev/null
+++ b/.github/workflows/clang_static_analyzer/start.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+set -e
+
+sudo apt update
+
+DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends \
+ autoconf automake libtool g++ make sqlite3 libsqlite3-dev libtiff-dev libcurl4-openssl-dev jq
+
+CLANG_LLVM=clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04
+wget http://releases.llvm.org/9.0.0/$CLANG_LLVM.tar.xz
+tar xJf $CLANG_LLVM.tar.xz
+mv $CLANG_LLVM clang+llvm-9
+
+# prepare build files
+./autogen.sh
+
+NPROC=$(nproc)
+echo "NPROC=${NPROC}"
+export MAKEFLAGS="-j ${NPROC}"
+
+export PATH=$PWD/clang+llvm-9/bin:$PATH
+CXXFLAGS="-std=c++11" scan-build -o scanbuildoutput -plist -v ./configure
+rm -rf scanbuildoutput
+TOPDIR=$PWD
+scan-build -o $TOPDIR/scanbuildoutput -sarif -v -enable-checker alpha.unix.cstring.OutOfBounds,alpha.unix.cstring.BufferOverlap,optin.cplusplus.VirtualCall,optin.cplusplus.UninitializedObject make
+
+rm -f filtered_scanbuild.txt
+files=$(find scanbuildoutput -name "*.sarif")
+for f in $files; do
+ jq '.runs[].results[] | (if .locations[].physicalLocation.fileLocation.uri | (contains("_generated_parser") ) then empty else { "uri": .locations[].physicalLocation.fileLocation.uri, "msg": .message.text, "location": .codeFlows[-1].threadFlows[-1].locations[-1] } end)' < $f > tmp.txt
+ if [ -s tmp.txt ]; then
+ echo "Errors from $f: "
+ cat $f
+ echo ""
+ cat tmp.txt >> filtered_scanbuild.txt
+ fi
+done
+if [ -s filtered_scanbuild.txt ]; then
+ echo ""
+ echo ""
+ echo "========================"
+ echo "Summary of errors found:"
+ cat filtered_scanbuild.txt
+ /bin/false
+fi
diff --git a/.github/workflows/code_checks.yml b/.github/workflows/code_checks.yml
new file mode 100644
index 00000000..dc2cc6e4
--- /dev/null
+++ b/.github/workflows/code_checks.yml
@@ -0,0 +1,20 @@
+name: Code Checks
+
+on: [push, pull_request]
+
+jobs:
+
+ cppcheck_2004:
+ runs-on: ubuntu-20.04
+ if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Install Requirements
+ run: |
+ sudo apt update
+ sudo apt install -y --no-install-recommends cppcheck
+
+ - name: Run cppcheck test
+ run: ./scripts/cppcheck.sh
diff --git a/.github/workflows/conda.yml b/.github/workflows/conda.yml
index 80828772..596aaad2 100644
--- a/.github/workflows/conda.yml
+++ b/.github/workflows/conda.yml
@@ -7,6 +7,7 @@ on:
jobs:
build:
name: Conda ${{ matrix.platform }}
+ if: github.repository == 'OSGeo/PROJ'
runs-on: ${{ matrix.platform }}
strategy:
@@ -20,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- - uses: goanpeca/setup-miniconda@v1
+ - uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
auto-update-conda: true
diff --git a/.github/workflows/doc_build.yml b/.github/workflows/doc_build.yml
index fa4546b2..52bf2b63 100644
--- a/.github/workflows/doc_build.yml
+++ b/.github/workflows/doc_build.yml
@@ -11,7 +11,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- - uses: goanpeca/setup-miniconda@v1
+ - uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
auto-update-conda: true
diff --git a/.github/workflows/linux_gcc_32bit.yml b/.github/workflows/linux_gcc_32bit.yml
new file mode 100644
index 00000000..455bf301
--- /dev/null
+++ b/.github/workflows/linux_gcc_32bit.yml
@@ -0,0 +1,24 @@
+name: Linux GCC 32bit
+
+on: [push, pull_request]
+
+jobs:
+
+ linux_gcc_32bit:
+ runs-on: ubuntu-latest
+ if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Cache
+ uses: actions/cache@v2
+ id: cache
+ with:
+ path: |
+ ${{ github.workspace }}/ccache.tar.gz
+ key: ${{ runner.os }}-cache-gcc32bit-${{ github.run_id }}
+ restore-keys: ${{ runner.os }}-cache-gcc32bit-
+
+ - name: Run
+ run: docker run -e CI -e WORK_DIR="$PWD" -v $PWD:$PWD ubuntu:20.04 $PWD/.github/workflows/linux_gcc_32bit/start.sh
diff --git a/.github/workflows/linux_gcc_32bit/start.sh b/.github/workflows/linux_gcc_32bit/start.sh
new file mode 100755
index 00000000..42746fe8
--- /dev/null
+++ b/.github/workflows/linux_gcc_32bit/start.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+set -e
+
+export TRAVIS_OS_NAME=linux
+export BUILD_NAME=linux_gcc_32bit
+export TRAVIS_BUILD_DIR="$WORK_DIR"
+
+ARCH=i386
+
+dpkg --add-architecture i386
+apt update -y
+
+DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+ autoconf automake libtool gcc-multilib g++-multilib g++ sqlite3 \
+ python3-pip \
+ make cmake ccache pkg-config tar zip \
+ libsqlite3-dev:$ARCH libtiff-dev:$ARCH libcurl4-openssl-dev:$ARCH \
+ jq
+
+pip3 install --user jsonschema
+export PATH=$HOME/.local/bin:$PATH
+
+export CXXFLAGS='-g -O2 -m32 -D_GLIBCXX_ASSERTIONS'
+export CFLAGS='-g -O2 -m32'
+export TIFF_CFLAGS=-I/usr/include/i386-linux-gnu
+export TIFF_LIBS="-L/usr/lib/i386-linux-gnu -ltiff"
+export SQLITE3_CFLAGS=-I/usr/include/i386-linux-gnu
+export SQLITE3_LIBS="-L/usr/lib/i386-linux-gnu -lsqlite3"
+export CC="ccache gcc"
+export CXX="ccache g++"
+
+NPROC=$(nproc)
+echo "NPROC=${NPROC}"
+export MAKEFLAGS="-j ${NPROC}"
+
+cd "$WORK_DIR"
+
+if test -f "$WORK_DIR/ccache.tar.gz"; then
+ echo "Restoring ccache..."
+ (cd $HOME && tar xzf "$WORK_DIR/ccache.tar.gz")
+fi
+
+export CCACHE_CPP2=yes
+export PROJ_DB_CACHE_DIR="$HOME/.ccache"
+
+ccache -M 500M
+ccache -s
+
+CFLAGS="-Werror $CFLAGS" CXXFLAGS="-Werror $CXXFLAGS" ./travis/install.sh
+
+ccache -s
+
+echo "Saving ccache..."
+rm -f "$WORK_DIR/ccache.tar.gz"
+(cd $HOME && tar czf "$WORK_DIR/ccache.tar.gz" .ccache)
diff --git a/.github/workflows/linux_gcc_4_8.yml b/.github/workflows/linux_gcc_4_8.yml
new file mode 100644
index 00000000..1f37785c
--- /dev/null
+++ b/.github/workflows/linux_gcc_4_8.yml
@@ -0,0 +1,29 @@
+name: Linux GCC 4.8
+
+on: [push, pull_request]
+
+jobs:
+
+ linux_gcc_4_8:
+ runs-on: ubuntu-latest
+ if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Cache
+ uses: actions/cache@v2
+ id: cache
+ with:
+ path: |
+ ${{ github.workspace }}/ccache.tar.gz
+ key: ${{ runner.os }}-cache-gcc-4-8-${{ github.run_id }}
+ restore-keys: ${{ runner.os }}-cache-gcc-4-8-
+
+ - name: Run
+ run: docker run -e CI -e WORK_DIR="$PWD" -v $PWD:$PWD ubuntu:16.04 $PWD/.github/workflows/linux_gcc_4_8/start.sh
+
+ - name: Coveralls
+ uses: coverallsapp/github-action@v1.1.2
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/linux_gcc_4_8/start.sh b/.github/workflows/linux_gcc_4_8/start.sh
new file mode 100755
index 00000000..2493ea1a
--- /dev/null
+++ b/.github/workflows/linux_gcc_4_8/start.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+set -e
+
+export TRAVIS_OS_NAME=linux
+export BUILD_NAME=linux_gcc
+export TRAVIS_BUILD_DIR="$WORK_DIR"
+
+apt update -y
+
+DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+ autoconf automake libtool g++-4.8 sqlite3 \
+ python3-pip python3-setuptools \
+ make cmake ccache pkg-config tar zip \
+ libsqlite3-dev libtiff-dev libcurl4-openssl-dev \
+ jq lcov
+
+pip3 install --user --upgrade pip
+echo `pip3 --version`
+pip3 config --user set global.progress_bar off
+pip3 install --user jsonschema
+pip3 install --user cmake==3.9.6
+
+export PATH=$HOME/.local/bin:$PATH
+
+export CC="ccache gcc-4.8"
+export CXX="ccache g++-4.8"
+
+NPROC=$(nproc)
+echo "NPROC=${NPROC}"
+export MAKEFLAGS="-j ${NPROC}"
+
+cd "$WORK_DIR"
+
+if test -f "$WORK_DIR/ccache.tar.gz"; then
+ echo "Restoring ccache..."
+ (cd $HOME && tar xzf "$WORK_DIR/ccache.tar.gz")
+fi
+
+export CCACHE_CPP2=yes
+export PROJ_DB_CACHE_DIR="$HOME/.ccache"
+
+ccache -M 500M
+ccache -s
+
+CFLAGS="-Werror $CFLAGS" CXXFLAGS="-Werror $CXXFLAGS" ./travis/install.sh
+
+ccache -s
+
+echo "Saving ccache..."
+rm -f "$WORK_DIR/ccache.tar.gz"
+(cd $HOME && tar czf "$WORK_DIR/ccache.tar.gz" .ccache)
+
+mkdir -p coverage
+lcov --no-external --capture --directory src --output-file coverage/lcov.info
diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml
new file mode 100644
index 00000000..1ccbd938
--- /dev/null
+++ b/.github/workflows/mac.yml
@@ -0,0 +1,39 @@
+name: MacOS build
+
+on: [push, pull_request]
+
+jobs:
+
+ macos_build:
+ runs-on: macos-latest
+ if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
+ steps:
+
+ - uses: actions/checkout@v2
+
+ - uses: conda-incubator/setup-miniconda@v2
+ with:
+ channels: conda-forge
+ auto-update-conda: true
+
+ - name: Cache
+ uses: actions/cache@v2
+ id: cache
+ with:
+ path: ~/.ccache
+ key: ${{ runner.os }}-cache-mac-${{ github.run_id }}
+ restore-keys: ${{ runner.os }}-cache-mac-
+
+ - name: Install Requirements
+ shell: bash -l {0}
+ run: |
+ source .github/workflows/mac/before_install.sh
+
+ - name: Build
+ shell: bash -l {0}
+ run: |
+ export TRAVIS_BUILD_DIR=$PWD
+ source .github/workflows/mac/install.sh
+ env:
+ TRAVIS_OS_NAME: osx
+ BUILD_NAME: osx
diff --git a/.github/workflows/mac/before_install.sh b/.github/workflows/mac/before_install.sh
new file mode 100755
index 00000000..217039fe
--- /dev/null
+++ b/.github/workflows/mac/before_install.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+
+conda update -n base -c defaults conda
+conda install compilers -y
+
+conda config --set channel_priority strict
+conda install --yes --quiet python=3.8 autoconf automake libtool ccache -y
+conda install --yes --quiet proj=7.1.1=h45baca5_3 --only-deps -y
+
+./travis/before_install_pip.sh
diff --git a/.github/workflows/mac/install.sh b/.github/workflows/mac/install.sh
new file mode 100755
index 00000000..ed27150f
--- /dev/null
+++ b/.github/workflows/mac/install.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+export CCACHE_CPP2=yes
+export PROJ_DB_CACHE_DIR="$HOME/.ccache"
+
+ccache -M 200M
+ccache -s
+
+CC="ccache clang" CXX="ccache clang++" CFLAGS="-Werror -O2" CXXFLAGS="-Werror -O2" ./travis/install.sh
+
+ccache -s
diff --git a/.github/workflows/mingw_w64.yml b/.github/workflows/mingw_w64.yml
new file mode 100644
index 00000000..8e323efa
--- /dev/null
+++ b/.github/workflows/mingw_w64.yml
@@ -0,0 +1,24 @@
+name: mingw_w64 build
+
+on: [push, pull_request]
+
+jobs:
+
+ mingw_w64_build:
+ runs-on: ubuntu-latest
+ if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Cache
+ uses: actions/cache@v2
+ id: cache
+ with:
+ path: |
+ ${{ github.workspace }}/ccache.tar.gz
+ key: ${{ runner.os }}-cache-mingw_w64-${{ github.run_id }}
+ restore-keys: ${{ runner.os }}-cache-mingw_w64-
+
+ - name: Build
+ run: docker run -e CI -e TRAVIS_OS_NAME=linux -e BUILD_NAME=mingw_w64 -e WORK_DIR="$PWD" -v $PWD:$PWD ubuntu:18.04 $PWD/.github/workflows/mingw_w64/start.sh
diff --git a/.github/workflows/mingw_w64/start.sh b/.github/workflows/mingw_w64/start.sh
new file mode 100755
index 00000000..2b42381f
--- /dev/null
+++ b/.github/workflows/mingw_w64/start.sh
@@ -0,0 +1,118 @@
+#!/bin/sh
+
+set -e
+
+SCRIPT_DIR=$(dirname "$0")
+case $SCRIPT_DIR in
+ "/"*)
+ ;;
+ ".")
+ SCRIPT_DIR=$(pwd)
+ ;;
+ *)
+ SCRIPT_DIR=$(pwd)/$(dirname "$0")
+ ;;
+esac
+
+apt-get update -y
+DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+ sudo wget tzdata
+
+USER=root
+export USER
+
+cd "$WORK_DIR"
+
+if test -f "$WORK_DIR/ccache.tar.gz"; then
+ echo "Restoring ccache..."
+ (cd $HOME && tar xzf "$WORK_DIR/ccache.tar.gz")
+fi
+
+export PROJ_DB_CACHE_DIR="$HOME/.ccache"
+
+sudo apt-get install -y --no-install-recommends \
+ ccache \
+ binutils-mingw-w64-x86-64 \
+ gcc-mingw-w64-x86-64 \
+ g++-mingw-w64-x86-64 \
+ g++-mingw-w64 \
+ mingw-w64-tools \
+ wine-stable \
+ make autoconf automake libtool zip \
+ sqlite3 \
+ curl ca-certificates
+
+# Select posix/pthread for std::mutex
+update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
+update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
+
+ccache -M 500M
+ccache -s
+
+MINGW_ARCH=x86_64-w64-mingw32
+MINGW_PREFIX=/usr/lib/gcc/$MINGW_ARCH/7.3-posix
+
+export CCACHE_CPP2=yes
+export CC="ccache $MINGW_ARCH-gcc"
+export CXX="ccache $MINGW_ARCH-g++"
+export LD=$MINGW_ARCH-ld
+
+UNAME="$(uname)" || UNAME=""
+NPROC=$(nproc);
+echo "NPROC=${NPROC}"
+export MAKEFLAGS="-j ${NPROC}"
+
+# prepare wine environment
+export WINE_PREFIX="$HOME/.wine"
+WINE_SYSDIR=$WINE_PREFIX/drive_c/windows
+wine64 cmd /c dir
+ln -s $MINGW_PREFIX/libstdc++-6.dll $WINE_SYSDIR
+ln -s $MINGW_PREFIX/libgcc_s_seh-1.dll $WINE_SYSDIR
+ln -s $MINGW_PREFIX/libgcc_s_sjlj-1.dll $WINE_SYSDIR
+ln -s /usr/$MINGW_ARCH/lib/libwinpthread-1.dll $WINE_SYSDIR
+
+# build zlib
+wget https://github.com/madler/zlib/archive/v1.2.11.tar.gz
+tar xzf v1.2.11.tar.gz
+(cd zlib-1.2.11 && sudo make install -fwin32/Makefile.gcc SHARED_MODE=1 PREFIX=x86_64-w64-mingw32- DESTDIR=/usr/$MINGW_ARCH/)
+sudo mkdir -p /usr/$MINGW_ARCH/include
+sudo mkdir -p /usr/$MINGW_ARCH/lib
+sudo cp /usr/$MINGW_ARCH/*.h /usr/$MINGW_ARCH/include
+sudo cp /usr/$MINGW_ARCH/libz.* /usr/$MINGW_ARCH/lib
+ln -s /usr/$MINGW_ARCH/zlib1.dll $WINE_SYSDIR
+
+# build libtiff
+wget https://download.osgeo.org/libtiff/tiff-4.1.0.tar.gz
+tar xzf tiff-4.1.0.tar.gz
+(cd tiff-4.1.0 && ./configure --host=$MINGW_ARCH --prefix=/usr/$MINGW_ARCH && make && sudo make install)
+ln -s /usr/$MINGW_ARCH/bin/libtiff-5.dll $WINE_SYSDIR
+
+# build sqlite3
+wget https://sqlite.org/2020/sqlite-autoconf-3330000.tar.gz
+tar xzf sqlite-autoconf-3330000.tar.gz
+# Build with SQLITE_DQS=0 to ensure we properly use single quotes and double quotes (cf issue #2480)
+(cd sqlite-autoconf-3330000 &&
+CFLAGS="-DSQLITE_DQS=0" ./configure --host=$MINGW_ARCH --prefix=/usr/$MINGW_ARCH && make && sudo make install)
+ln -s /usr/$MINGW_ARCH/bin/libsqlite3-0.dll $WINE_SYSDIR
+
+# prepare build files
+./autogen.sh
+# autoconf build
+mkdir build_autoconf
+cd build_autoconf
+CFLAGS="-Werror" CXXFLAGS="-Werror" ../configure --host=$MINGW_ARCH --prefix=/tmp/proj_autoconf_install --without-curl
+make
+make install
+make dist-all
+find /tmp/proj_autoconf_install
+(cd test; make)
+cp -r ../data/tests /tmp/proj_autoconf_install/share/proj
+cp ../data/tests/egm96_15_downsampled.gtx /tmp/proj_autoconf_install/share/proj/egm96_15.gtx
+cp ../data/tests/ntv2_0_downsampled.gsb /tmp/proj_autoconf_install/share/proj/ntv2_0.gsb
+wine64 test/unit/test_cpp_api.exe
+
+ccache -s
+
+echo "Saving ccache..."
+rm -f "$WORK_DIR/ccache.tar.gz"
+(cd $HOME && tar czf "$WORK_DIR/ccache.tar.gz" .ccache)
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
new file mode 100644
index 00000000..13179c18
--- /dev/null
+++ b/.github/workflows/windows.yml
@@ -0,0 +1,62 @@
+name: Windows build
+
+on: [push, pull_request]
+
+jobs:
+
+ MSVC:
+ runs-on: windows-latest
+ if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
+
+ env:
+ ARCH: x64
+ BUILD_SHARED_LIBS: ON
+
+ steps:
+
+ - uses: actions/checkout@v2
+ - uses: ilammy/msvc-dev-cmd@v1
+
+ - name: Cache vcpkg packages
+ uses: actions/cache@v2
+ id: cache
+ with:
+ path: c:\vcpkg\installed
+ key: ${{ runner.os }}-vcpkg-${{ hashFiles('.github/workflows/windows.yml') }}
+
+ - name: Install build requirements
+ shell: cmd
+ if: steps.cache.outputs.cache-hit != 'true'
+ run: |
+ vcpkg install sqlite3[core,tool]:${{ env.ARCH }}-windows
+ vcpkg install tiff:${{ env.ARCH }}-windows
+ vcpkg install curl:${{ env.ARCH }}-windows
+
+ - name: Build
+ shell: cmd
+ run: |
+ set VCPKG_INSTALLED=c:\vcpkg\installed\${{ env.ARCH }}-windows
+ dir %VCPKG_INSTALLED%\bin
+ set PATH=%VCPKG_INSTALLED%\bin;%PATH%
+ set PROJ_BUILD=%GITHUB_WORKSPACE%\build
+ mkdir %PROJ_BUILD%
+ cd %PROJ_BUILD%
+ set PROJ_DIR=%GITHUB_WORKSPACE%\proj_dir
+ cmake -GNinja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS="{{ env.BUILD_SHARED_LIBS }}" -DCMAKE_C_FLAGS="/WX" -DCMAKE_CXX_FLAGS="/WX" -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX="%PROJ_DIR%"
+ ninja -v
+ ninja install
+ dir %PROJ_DIR%\bin
+
+ - name: Run tests
+ shell: cmd
+ run: |
+ set VCPKG_INSTALLED=c:\vcpkg\installed\${{ env.ARCH }}-windows
+ set PATH=%VCPKG_INSTALLED%\bin;%PATH%
+ set PROJ_DIR=%GITHUB_WORKSPACE%\proj_dir
+ set PROJ_LIB=%PROJ_DIR%\share\proj
+ set PROJ_BUILD=%GITHUB_WORKSPACE%\build
+ cd %PROJ_BUILD%
+ ctest -V -C Release
+ set PATH=%PROJ_DIR%\bin;%PATH%
+ call %GITHUB_WORKSPACE%\test\postinstall\test_cmake.bat %PROJ_DIR%
+ proj