Build #488
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The name of our workflow | |
name: Build | |
on: [push, pull_request] | |
jobs: | |
msvc: | |
strategy: | |
matrix: | |
arch: [x86, x64, arm64] | |
ossl: [ossl1.1.1, ossl3] | |
ovpn3: | |
- preset: "" | |
name: "" | |
upload_name: "" | |
- preset: -ovpn3 | |
name: " - ovpn3" | |
upload_name: "_ovpn3" | |
env: | |
# Indicates the location of the vcpkg as a Git submodule of the project repository. | |
VCPKG_ROOT: ${{ github.workspace }}/vcpkg | |
name: 'msvc - ${{matrix.arch}} - ${{ matrix.ossl }}${{ matrix.ovpn3.name }}' | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: lukka/get-cmake@latest | |
- name: Restore artifacts, or setup vcpkg (do not install any package) | |
uses: lukka/run-vcpkg@v10 | |
with: | |
vcpkgGitCommitId: "a5d6d145164e82e67fbf91a4a30f98699d30de63" | |
appendedCacheKey: "${{ matrix.arch }} - ${{ matrix.ossl }}" | |
- name: Run CMake consuming CMakePreset.json and vcpkg.json by mean of vcpkg. | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: '${{ matrix.arch }}-release-${{ matrix.ossl }}${{ matrix.ovpn3.preset }}' | |
buildPreset: '${{ matrix.arch }}-release-${{ matrix.ossl }}${{ matrix.ovpn3.preset }}' | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: openvpn-gui_${{ matrix.arch }}_${{ matrix.ossl }}${{ matrix.ovpn3.upload_name }} | |
path: | | |
out/build/${{ matrix.arch }}-release-${{ matrix.ossl }}${{ matrix.ovpn3.preset }}/*.dll | |
out/build/${{ matrix.arch }}-release-${{ matrix.ossl }}${{ matrix.ovpn3.preset }}/*.exe | |
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 | |