deskflow/.github/workflows/aws-upload-windows.yml
Daun Chung cd7d8df7a6
SYNERGY-1043 (#7084)
* testing github action on ubuntu to load binary to s3

* changing the job in linux back to original

* Delete .secrets

* adding logs to changelog

* renaming secrets keys

* separating s3 upload action

* attaching aws upload calls to pull request, for testing

* fixing the keys for s3

* changing name of upload actions

* fixing the indentation issue

* enabling ubuntu 18

* enabling all the older versions of linux

* removing curl + nodejs installation

* ubuntu using 1 thread to make

* running make -j1 on job-test-linux-ubuntu

* adding s3-uploader for mac and windows

* renaming upload jobs

* fixing paths of mac and windows

* setting windows directory

* setting up upload for raspberry pi os

* windows upload without backslashes

* windows upload to use correct repo

* adding mac_1013 + updating path for raspberry

* attempting to create github action to support x32 and x64

* adding quotes around comparison

* logging aqt install command

* attempting to log on windows

* splitting the set-output procedure

* setting ids to setting qt variables

* merging setup step into one

* test

* removing syntax issue

* logging build

* commenting out x32

* disabling x64

* adding force tag to openssl installation

* adding open_ssl_dir for x32 and x64

* syntax issue

* testing mac-1013 upload on push

* openssl test

* fix indentation issue

* keeping the OPEN_SSL_DIR and uninstall -> reinstall openssl

* indentation fix

* disabling x86 and keeping x64 for windows

* changing the upload trigger to when release created

* cleaning up yml files

* testing the last changes to yml files

* changing uploads to trigger on release, updating changelog

* removing unused env var from mac 10.13

* updating linux ubuntu test to use -j1 only when ubuntu16.04 is running

* removing enterprise matrix from mac-10.13

Co-authored-by: Daun Chung <daunchung@github.com>
2021-09-14 14:42:46 +03:00

101 lines
3.3 KiB
YAML

name: Windows-Upload
on:
release:
types: [created]
jobs:
build:
runs-on: windows-2019
env:
GIT_COMMIT: ${{ github.sha }}
BONJOUR_BASE_DIR: ${{ github.workspace }}\deps\bonjour
QT_BASE_DIR: ${{ github.workspace }}\deps\Qt
QT_VERSION: 5.12.6
QT_BASE_URL: http://qt.mirror.constant.com/
QT_LIB_DIR: ${{ github.workspace }}\deps\Qt\5.12.6
strategy:
matrix:
arch: ['x64']
steps:
- uses: actions/checkout@v2
- name: Set up QT variables
run: |
if ('${{ matrix.arch }}' -eq 'x64')
{
Write-Output "::set-output name=QT_ARCH::win64_msvc2017_64"
Write-Output "::set-output name=QT_DIR::msvc2017_64"
Write-Output "::set-output name=OPEN_SSL_DIR::C:\\Program Files\\OpenSSL-Win64"
}
else
{
Write-Output "::set-output name=QT_ARCH::win32_msvc2017"
Write-Output "::set-output name=QT_DIR::msvc2017"
Write-Output "::set-output name=OPEN_SSL_DIR::C:\\Program Files (x86)\\OpenSSL-Win32"
}
id: qt-setup
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ${{ env.QT_BASE_DIR }}
key: ${{ runner.os }}-Qt_${{ env.QT_VERSION }}-${{ steps.qt-setup.outputs.QT_ARCH }}
- name: LOG Qt
run: |
Write-Output "matrix arch ${{ matrix.arch }}"
Write-Output "python -m aqt install --outputdir $env:QT_BASE_DIR --base $env:QT_BASE_URL $env:QT_VERSION windows desktop ${{ steps.qt-setup.outputs.QT_ARCH }}"
- name: Install Qt
if: steps.cache-qt.outputs.cache-hit != 'true'
run: |
pip install aqtinstall
python -m aqt install --outputdir $env:QT_BASE_DIR --base $env:QT_BASE_URL $env:QT_VERSION windows desktop ${{ steps.qt-setup.outputs.QT_ARCH }}
- name: Cache Bonjour
id: cache-bonjour
uses: actions/cache@v1
with:
path: ${{ env.BONJOUR_BASE_DIR }}
key: ${{ runner.os }}-Bonjour
- name: Install Bonjour SDK
if: steps.cache-bonjour.outputs.cache-hit != 'true'
run: |
New-Item -Force -ItemType Directory -Path "$env:BONJOUR_BASE_DIR"
$client = new-object System.Net.WebClient
$client.DownloadFile("https://binaries.symless.com/bonjour/BonjourSDK.zip",".\bonjoursdk.zip")
[System.IO.Compression.ZipFile]::ExtractToDirectory(".\bonjoursdk.zip", "$env:BONJOUR_BASE_DIR")
- name: Install OpenSSL
run: |
choco uninstall openssl -y --ignore-autouninstaller-failure --no-progress
choco install openssl -y --force${{ matrix.arch }} --no-progress
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Build
env:
CMAKE_PREFIX_PATH: "${{ env.QT_LIB_DIR }}\\${{ steps.qt-setup.outputs.QT_DIR }}\\;${{ steps.qt-setup.outputs.OPEN_SSL_DIR }}"
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
. ./version
msbuild synergy-core.sln /p:Configuration=Release
- uses: anshulrgoyal/upload-s3-action@master
with:
aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }}
aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: ./build/bin
destination_dir: "./synergy3/latest/Windows_${{ matrix.arch }}/"