2022-02-03 09:48:07 +01:00
|
|
|
name: Build
|
2021-04-21 07:44:01 +02:00
|
|
|
|
2022-02-03 09:48:07 +01:00
|
|
|
on: [push, pull_request]
|
2021-04-21 07:44:01 +02:00
|
|
|
|
|
|
|
jobs:
|
2022-02-03 09:48:07 +01:00
|
|
|
msvc:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: [x86, amd64, amd64_arm64]
|
2021-04-21 07:44:01 +02:00
|
|
|
|
2022-02-03 09:48:07 +01:00
|
|
|
env:
|
|
|
|
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
|
|
|
|
BUILD_CONFIGURATION: Release
|
|
|
|
|
|
|
|
runs-on: windows-latest
|
2021-04-21 07:44:01 +02:00
|
|
|
steps:
|
2023-02-24 14:11:22 +01:00
|
|
|
- uses: actions/checkout@v3
|
2024-02-23 12:17:16 +01:00
|
|
|
- uses: lukka/get-cmake@v3.28.3
|
2021-04-21 07:44:01 +02:00
|
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
2022-02-03 09:48:07 +01:00
|
|
|
with:
|
|
|
|
arch: ${{ matrix.arch }}
|
2021-04-21 07:44:01 +02:00
|
|
|
|
|
|
|
- name: Restore from cache and install vcpkg
|
2023-07-28 18:36:39 +02:00
|
|
|
uses: lukka/run-vcpkg@v11
|
2021-04-21 07:44:01 +02:00
|
|
|
with:
|
2024-02-28 12:22:30 +01:00
|
|
|
vcpkgGitCommitId: 8b04a7bd93bef991818fc372bb83ce00ec1c1c16
|
2023-02-24 11:24:39 +01:00
|
|
|
vcpkgJsonGlob: '**/windows/vcpkg.json'
|
2021-04-21 07:44:01 +02:00
|
|
|
|
|
|
|
- name: Run CMake with vcpkg.json manifest
|
2023-02-24 11:24:39 +01:00
|
|
|
uses: lukka/run-cmake@v10
|
2023-07-31 11:58:54 +02:00
|
|
|
if: ${{ matrix.arch != 'amd64_arm64' }}
|
|
|
|
with:
|
|
|
|
configurePreset: win-${{ matrix.arch }}-release
|
|
|
|
buildPreset: win-${{ matrix.arch }}-release
|
|
|
|
testPreset: win-${{ matrix.arch }}-release
|
|
|
|
|
|
|
|
- name: Run CMake with vcpkg.json manifest (NO TESTS)
|
|
|
|
uses: lukka/run-cmake@v10
|
|
|
|
if: ${{ matrix.arch == 'amd64_arm64' }}
|
2021-04-21 07:44:01 +02:00
|
|
|
with:
|
2023-02-24 11:24:39 +01:00
|
|
|
configurePreset: win-${{ matrix.arch }}-release
|
|
|
|
buildPreset: win-${{ matrix.arch }}-release
|
2022-02-03 09:48:07 +01:00
|
|
|
|
2023-02-24 14:11:22 +01:00
|
|
|
- uses: actions/upload-artifact@v3
|
2022-02-03 09:48:07 +01:00
|
|
|
with:
|
2023-02-24 11:24:39 +01:00
|
|
|
name: openvpn3-msvc-${{ matrix.arch }}
|
2022-02-03 09:48:07 +01:00
|
|
|
path: |
|
2023-02-24 11:24:39 +01:00
|
|
|
${{ github.workspace }}/build/**/*.exe
|
|
|
|
${{ github.workspace }}/build/**/*.dll
|
|
|
|
!${{ github.workspace }}/build/**/test/ssl/**
|
|
|
|
!${{ github.workspace }}/build/**/test/unittests/**
|
|
|
|
!${{ github.workspace }}/build/**/CMakeFiles/**
|
|
|
|
!${{ github.workspace }}/build/**/vcpkg_installed/**
|
|
|
|
mingw:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: [x86, x64]
|
|
|
|
|
|
|
|
env:
|
|
|
|
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-02-24 14:11:22 +01:00
|
|
|
- uses: actions/checkout@v3
|
2024-02-23 12:17:16 +01:00
|
|
|
- uses: lukka/get-cmake@v3.28.3
|
2023-02-24 11:24:39 +01:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt update && sudo apt install -y mingw-w64 unzip cmake build-essential
|
|
|
|
|
|
|
|
- name: Restore from cache and install vcpkg
|
2023-07-28 18:36:39 +02:00
|
|
|
uses: lukka/run-vcpkg@v11
|
2023-02-24 11:24:39 +01:00
|
|
|
with:
|
2024-02-28 12:22:30 +01:00
|
|
|
vcpkgGitCommitId: 8b04a7bd93bef991818fc372bb83ce00ec1c1c16
|
2023-02-24 11:24:39 +01:00
|
|
|
vcpkgJsonGlob: '**/mingw/vcpkg.json'
|
|
|
|
|
|
|
|
- name: Run CMake with vcpkg.json manifest
|
|
|
|
uses: lukka/run-cmake@v10
|
|
|
|
with:
|
|
|
|
configurePreset: mingw-${{ matrix.arch }}-release
|
|
|
|
buildPreset: mingw-${{ matrix.arch }}-release
|
|
|
|
|
2023-02-24 14:11:22 +01:00
|
|
|
- uses: actions/upload-artifact@v3
|
2023-02-24 11:24:39 +01:00
|
|
|
with:
|
|
|
|
name: openvpn3-mingw-${{ matrix.arch }}
|
|
|
|
path: |
|
|
|
|
${{ github.workspace }}/build/**/*.exe
|
|
|
|
${{ github.workspace }}/build/**/*.dll
|
|
|
|
!${{ github.workspace }}/build/**/test/ssl/**
|
|
|
|
!${{ github.workspace }}/build/**/test/unittests/**
|
|
|
|
!${{ github.workspace }}/build/**/CMakeFiles/**
|
|
|
|
!${{ github.workspace }}/build/**/vcpkg_installed/**
|