mirror of https://github.com/OpenVPN/openvpn-gui
GitHib Actions: add MinGW builds
Add mingw/mingw64 builds with ossl1.1.1/ossl3.0.1. Remove appveyor and travis scripts. Signed-off-by: Lev Stipakov <lev@openvpn.net>pull/483/head
parent
9356ccb806
commit
9d2e79dc6a
|
@ -1,31 +0,0 @@
|
|||
version: "cygwin-{build}"
|
||||
|
||||
skip_commits:
|
||||
files:
|
||||
- .travis.yml
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- BUILDSYSTEM: cygwin
|
||||
ARCH: x86
|
||||
CYGWIN: C:\Cygwin
|
||||
CHOST: i686-w64-mingw32
|
||||
CC: i686-w64-mingw32-gcc
|
||||
- BUILDSYSTEM: cygwin
|
||||
ARCH: x86_64
|
||||
CYGWIN: C:\Cygwin64
|
||||
CHOST: x86_64-w64-mingw32
|
||||
CC: x86_64-w64-mingw32-gcc
|
||||
|
||||
for:
|
||||
-
|
||||
matrix:
|
||||
only:
|
||||
- BUILDSYSTEM: cygwin
|
||||
build_script:
|
||||
- "%CYGWIN%\\setup-%ARCH%.exe -g -q -P mingw64-i686-openssl,mingw64-x86_64-openssl,cygwin-devel"
|
||||
- "%CYGWIN%\\bin\\bash -lc 'set -eux; cd /cygdrive/c/projects/%APPVEYOR_PROJECT_SLUG%; autoreconf -iv; ./configure --prefix=/ --libdir=/lib --host=$CHOST --build=i686-pc-cygwin --program-prefix=\'\'; make'"
|
||||
artifacts:
|
||||
- path: openvpn-gui.exe
|
||||
on_failure:
|
||||
- cmd: appveyor PushArtifact config.log
|
|
@ -24,6 +24,7 @@ jobs:
|
|||
VCPKG_OVERLAY_PORTS: '${{ github.workspace }}/openvpn/contrib/vcpkg-ports'
|
||||
buildDir: '${{ github.workspace }}/build/'
|
||||
|
||||
name: "msvc - ${{matrix.triplet}} - ${{ matrix.ossl }}"
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -59,3 +60,73 @@ jobs:
|
|||
path: |
|
||||
${{ env.buildDir }}/*.exe
|
||||
${{ env.buildDir }}/*.dll
|
||||
|
||||
mingw:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
openssl_version: [1.1.1m, 3.0.1]
|
||||
target: [mingw64, mingw]
|
||||
include:
|
||||
- target: mingw64
|
||||
chost: x86_64-w64-mingw32
|
||||
- target: mingw
|
||||
chost: i686-w64-mingw32
|
||||
|
||||
name: "gcc-mingw - ${{matrix.target}} - ossl${{ matrix.openssl_version }}"
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
env:
|
||||
MAKEFLAGS: -j3
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: sudo apt update && sudo apt install -y mingw-w64 libtool automake autoconf
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: openvpn-gui
|
||||
|
||||
- name: autoconf
|
||||
run: autoreconf -fvi
|
||||
working-directory: openvpn-gui
|
||||
|
||||
- name: Cache dependencies
|
||||
id: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: '~/mingw/'
|
||||
key: mingw-${{ matrix.target }}-${{ matrix.openssl_version }}
|
||||
|
||||
- name: Download mingw dependencies
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
wget -c -P download-cache/ "https://www.openssl.org/source/openssl-${{ matrix.openssl_version }}.tar.gz"
|
||||
tar zxf "download-cache/openssl-${{ matrix.openssl_version }}.tar.gz"
|
||||
|
||||
- name: Configure OpenSSL
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./Configure --cross-compile-prefix=${{ matrix.chost }}- shared ${{ matrix.target }} no-capieng --prefix="${HOME}/mingw/opt" --openssldir="${HOME}/mingw/opt" -static-libgcc
|
||||
working-directory: "./openssl-${{ matrix.openssl_version }}"
|
||||
|
||||
- name: Build OpenSSL
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: make
|
||||
working-directory: "./openssl-${{ matrix.openssl_version }}"
|
||||
|
||||
- name: Install OpenSSL
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: make install
|
||||
working-directory: "./openssl-${{ matrix.openssl_version }}"
|
||||
|
||||
- name: configure
|
||||
# openssl3 uses lib64 on mingw64
|
||||
run: |
|
||||
[[ "${{ matrix.openssl_version }}" == "3.0.1" && "${{ matrix.target }}" == "mingw64" ]] && LIB="lib64" || LIB="lib"
|
||||
PKG_CONFIG_PATH=${HOME}/mingw/opt/${LIB}/pkgconfig ./configure --host=${{ matrix.chost }} --enable-password-change=yes
|
||||
working-directory: openvpn-gui
|
||||
|
||||
- name: make
|
||||
run: make
|
||||
working-directory: openvpn-gui
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -f download-cache/openssl-${OPENSSL_VERSION}.tar.gz ]; then wget -P download-cache/ https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz; fi
|
||||
|
||||
mkdir image
|
||||
tar zxf download-cache/openssl-${OPENSSL_VERSION}.tar.gz && cd openssl-${OPENSSL_VERSION}
|
||||
if [ ${CHOST} == "i686-w64-mingw32" ]; then export target=mingw; fi
|
||||
if [ ${CHOST} == "x86_64-w64-mingw32" ]; then export target=mingw64; fi
|
||||
./Configure --prefix=/ --cross-compile-prefix=${CHOST}- shared $target no-capieng --openssldir=/etc/ssl --libdir=/lib -static-libgcc >build.log 2>&1 || (cat build.log && exit 1)
|
||||
make install $([[ ${OPENSSL_VERSION} == "1.0."* ]] && echo "INSTALL_PREFIX" || echo "DESTDIR")="${HOME}/image" INSTALLTOP="/" MANDIR="/tmp" >build.log 2>&1 || (cat build.log && exit 1)
|
||||
cd ..
|
||||
|
||||
export OPENSSL_CRYPTO_CFLAGS="-I${HOME}/image/include"
|
||||
export OPENSSL_CRYPTO_LIBS="-L${HOME}/image/lib -lcrypto"
|
||||
|
43
.travis.yml
43
.travis.yml
|
@ -1,43 +0,0 @@
|
|||
sudo: required
|
||||
dist: xenial
|
||||
|
||||
os: linux
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
|
||||
env:
|
||||
global:
|
||||
- OPENSSL_VERSION=1.1.0g
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- compiler: gcc
|
||||
env: CHOST=i686-w64-mingw32 CONFIG=""
|
||||
- compiler: gcc
|
||||
env: CHOST=x86_64-w64-mingw32 CONFIG=""
|
||||
- compiler: gcc
|
||||
env: CHOST=i686-w64-mingw32 CONFIG="--disable-password-change"
|
||||
- compiler: gcc
|
||||
env: CHOST=x86_64-w64-mingw32 CONFIG="--disable-password-change"
|
||||
exclude:
|
||||
- compiler: gcc
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages: [ gcc-mingw-w64 ]
|
||||
|
||||
before_script:
|
||||
- unset CC; unset CXX
|
||||
|
||||
script:
|
||||
- if [[ $CONFIG != *"--disable-password-change"* ]]; then . .travis-build-openssl.sh; fi
|
||||
- autoreconf -i -v
|
||||
- ./configure --prefix=/ --libdir=/lib --host=$CHOST --build=x86_64-pc-linux-gnu --program-prefix='' $CONFIG && make
|
||||
# build from tarball
|
||||
- make distdir=dist dist && tar xvf dist.tar.gz && cd dist
|
||||
- ./configure --prefix=/ --libdir=/lib --host=$CHOST --build=x86_64-pc-linux-gnu --program-prefix='' $CONFIG && make
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- download-cache
|
Loading…
Reference in New Issue