Skip to content

Windows

Windows #941

Workflow file for this run

# This file is part of BOINC.
# https://boinc.berkeley.edu
# Copyright (C) 2022 University of California
#
# BOINC is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation,
# either version 3 of the License, or (at your option) any later version.
#
# BOINC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with BOINC. If not, see <http://www.gnu.org/licenses/>.
name: Windows
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * *'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }}
AWS_DEFAULT_REGION: us-west-2
jobs:
build:
name: ${{ matrix.app }}-${{ matrix.configuration }}-build
runs-on: windows-latest
strategy:
matrix:
app: [boinc-autodock-vina]
configuration: [x64-windows-static, x86-windows-static]
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup msbuild
uses: microsoft/setup-msbuild@v1
- name: Fix vcpkg
run: vcpkg.exe integrate remove
- name: Check if build is running from origin repo
if: ${{ success() && env.AWS_ACCESS_KEY_ID != 0 && env.AWS_SECRET_ACCESS_KEY != 0 }}
run: |
echo "VCPKG_BINARY_SOURCES=clear;x-aws,s3://vcpkg.cache.boinc-apps/,readwrite" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
- name: Check if build is running from fork
if: ${{ success() && (env.AWS_ACCESS_KEY_ID == 0 || env.AWS_SECRET_ACCESS_KEY == 0) }}
run: |
echo "VCPKG_BINARY_SOURCES=clear;x-aws-config,no-sign-request;x-aws,s3://vcpkg.cache.boinc-apps/,read" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
- name: Build
if: ${{ success() }}
run: python3 build.py -nt -ts=ci -t=${{ matrix.configuration }} ${{ matrix.app }}
- name: Test
if: ${{ success() }}
run: python3 build.py -nb -ts=ci -t=${{ matrix.configuration }} ${{ matrix.app }}
- name: Upload artifacts
if: ${{ success()}}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.app }}-${{ matrix.configuration }}-${{ github.event.pull_request.head.sha }}
path: |
build/${{ matrix.app }}/${{ matrix.configuration }}/Release/boinc-autodock-vina.exe
build/${{ matrix.app }}/${{ matrix.configuration }}/Release/config-validator.exe