Skip to content

Commit

Permalink
Fix GitHub Actions/Azure Windows Workflow/Pipeline
Browse files Browse the repository at this point in the history
Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
  • Loading branch information
Paulchen-Panther committed Jul 12, 2020
1 parent 4d56a89 commit 9c5e5ca
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 11 deletions.
26 changes: 22 additions & 4 deletions .azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,40 @@ jobs:
timeoutInMinutes: 120
pool:
vmImage: 'windows-latest'
variables:
VCINSTALLDIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC'

steps:
- checkout: self # represents the repo where the initial Pipelines YAML file was found
submodules: recursive # set to 'recursive' to get submodules of submodules

# install qt 5.15 via aqtinstall
- script: |
cd $(Build.SourcesDirectory)
python -m pip install aqtinstall
python -m aqt install -O c:\Qt 5.15.0 windows desktop win64_msvc2019_64
displayName: 'Install Qt'
# use Python 3.x from the tool cache
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
addToPath: true
architecture: 'x64'
displayName: 'Install Python'

# install nsis via chocolatey
- powershell: choco install --no-progress nsis -y
displayName: 'Install NSIS'

# install openssl via chocolatey
- powershell: choco install --no-progress openssl -y
displayName: 'Install OpenSSL'

# register x64 architecture environment
- script: |
cd $(Build.SourcesDirectory)
python -m pip install aqtinstall
python -m aqt install -O c:\Qt 5.15.0 windows desktop win64_msvc2019_64
displayName: 'Install Qt 5.15.0'
call "%VCINSTALLDIR%\Auxiliary\Build\vcvars64.bat"
displayName: 'Set up x64 build architecture environment'
# build process
- bash: ./.ci/ci_build.sh
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ jobs:
windows:
name: Windows
runs-on: windows-latest
env:
VCINSTALLDIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC'
steps:
- name: Checkout
uses: actions/checkout@v1
Expand All @@ -147,18 +149,18 @@ jobs:
python-version: '3.x'

- name: Install NSIS
run: |
Invoke-WebRequest https://netcologne.dl.sourceforge.net/project/nsis/NSIS%203/3.05/nsis-3.05-setup.exe -OutFile nsis-setup.exe
.\nsis-setup.exe /S
run: choco install --no-progress nsis -y

- name: Install OpenSSL
run: choco install --no-progress openssl -y

- name: Set up x64 build architecture environment
shell: cmd
run: call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
run: call "${{env.VCINSTALLDIR}}\Auxiliary\Build\vcvars64.bat"

# Build packages
- name: Build packages
env:
VCINSTALLDIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC'
PLATFORM: windows
shell: bash
run: ./.ci/ci_build.sh
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ jobs:
windows:
name: Windows
runs-on: windows-latest
env:
VCINSTALLDIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC'
steps:
- name: Checkout
uses: actions/checkout@v1
Expand All @@ -110,9 +112,15 @@ jobs:
with:
python-version: '3.x'

- name: Install NSIS
run: choco install --no-progress nsis -y

- name: Install OpenSSL
run: choco install --no-progress openssl -y

- name: Set up x64 build architecture environment
shell: cmd
run: call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
run: call "${{env.VCINSTALLDIR}}\Auxiliary\Build\vcvars64.bat"

# Build packages
- name: Build packages
Expand All @@ -121,6 +129,13 @@ jobs:
shell: bash
run: ./.ci/ci_build.sh

# upload artifacts (only on tagged commit)
- name: Upload artifacts
if: startsWith(github.event.ref, 'refs/tags')
uses: actions/upload-artifact@v2
with:
path: build/Hyperion-*

######################
#### Documentation ###
######################
Expand Down Expand Up @@ -165,7 +180,7 @@ jobs:
publish:
name: Publish Releases
if: startsWith(github.event.ref, 'refs/tags')
needs: [Linux, macOS, Docs]
needs: [Linux, macOS, windows, Docs]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -200,6 +215,7 @@ jobs:
prerelease: ${{ env.preRelease }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Dispatch event to build new HyperBian image
- name: Dispatch HyperBian build
uses: peter-evans/repository-dispatch@v1
Expand Down

0 comments on commit 9c5e5ca

Please sign in to comment.