onionshare/.github/workflows/build-windows.yml
2022-09-30 16:34:06 -07:00

49 lines
1.6 KiB
YAML

name: Build Windows
run-name: Build win32 and win64 🚀
on:
push:
branches:
- github-actions
jobs:
build-win64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Restore cache - poetry
uses: actions/cache@v3
with:
path: ~\.cache\AppData\Local\pypoetry\Cache\virtualenvs
key: ${{ runner.os }}-win64-poetry-${{ hashFiles('desktop/poetry.lock') }}
- name: Install poetry
run: C:\hostedtoolcache\windows\Python\3.9.13\x64\python -m pip install poetry
- name: Install poetry dependencies
run: cd desktop && C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts\poetry install
- name: Restore cache - tor
uses: actions/cache@v3
with:
path: desktop\build\tor
key: ${{ runner.os }}-win64-tor-${{ hashFiles('desktop/scripts/get-tor.py') }}
- name: Get tor binaries from Tor Browser (64-bit)
run: cd desktop && C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts\poetry run python .\scripts\get-tor.py win64
- name: Restore cache - obfs4proxy
uses: actions/cache@v3
with:
path: desktop\onionshare\resources\tor\obfs4proxy.exe
key: ${{ runner.os }}-win64-obfs4proxy-${{ hashFiles('desktop/scripts/build-pt-obfs4proxy.ps1') }}
- name: Build obfs4proxy
shell: pwsh
run: |
if ((Test-Path -Path 'project\desktop\onionshare\resources\tor\obfs4proxy.exe') -eq $True) {
Write-Output "obfs4proxy already built"
} else {
cd desktop
.\scripts\build-pt-obfs4proxy.ps1
}