Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boinc installer 5065 #5368

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/all_projects_list_xml_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Download latest all_projects_list.xml
if: success()
run: |
curl https://boinc.berkeley.edu/project_list.php --output ./win_build/installerv2/redist/all_projects_list.xml
curl https://boinc.berkeley.edu/project_list.php --output ./installer_wix/redist/all_projects_list.xml
- name: Check file was updated
if: success()
run: |
Expand All @@ -55,4 +55,4 @@ jobs:
base: master
delete-branch: true
add-paths: |
win_build/installerv2/redist/all_projects_list.xml
installer_wix/redist/all_projects_list.xml
134 changes: 134 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ env:
AWS_ACCESS_KEY_ID: ${{secrets.S3_ACCESS_KEY}}
AWS_SECRET_ACCESS_KEY: ${{secrets.S3_SECRET_KEY}}
AWS_DEFAULT_REGION: us-west-2
# installer certificates
CERTIFICATE_SIGN: ${{ secrets.CERTIFICATE_FILE }}
CERTIFICATE_PASS: ${{ secrets.CERTIFICATE_PASS }}
# virtualbox vars here are for convenience, wix sources need to be updated also (name and guid)
VBOX_URL: https://download.virtualbox.org/virtualbox/7.0.10/VirtualBox-7.0.10-158379-Win.exe
VBOX_NAME: VirtualBox-7.0.10-158379-Win.exe
VBOX_MD5: 8882a55227cccc8a3f7ab69641df19fd # keep lowercase


jobs:
build:
Expand Down Expand Up @@ -162,3 +170,129 @@ jobs:
with:
fail_ci_if_error: true
verbose: false

build-installers:
name: Installers
runs-on: windows-2022
needs: build
strategy:
matrix:
arch: ['x64','arm64']
variant: [ '', 'vbox' ]
exclude:
- arch: arm64
variant: vbox
fail-fast: false
defaults:
run:
shell: pwsh # necessary for installer script
env:
PREREQUISITES_PATH: "${{ github.workspace }}\\build\\prerequisites"
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Extract version
id: boinc-version-extract
run: |
$env:BOINC_VER = '<undefined>'
try {
$version = (type version.h | Select-String "#define BOINC_VERSION_STRING `"(.+)`"").Matches.Groups[1].Value
$env:BOINC_VER = $version
$versionVariable = "boincVersionString={0}" -f $version
echo $versionVariable | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
}
catch {
throw "Failed to extract BOINC version!"
}

- name: Install Wix
uses: actions/checkout@v2
with:
repository: parvit/wix
path: wix

- name: Install MSBuild
uses: microsoft/setup-msbuild@v1.1
with:
vs-version: '[17.0,19)'

- name: Create build folders
run: |
New-Item -Path "${{ github.workspace }}\build" -ItemType directory
New-Item -Path "${{ github.workspace }}\build\prerequisites" -ItemType directory

- name: Restore cached VirtualBox installer
if: ${{ matrix.variant == 'vbox' }}
id: cache-vbox-restore
uses: actions/cache/restore@v3
with:
path: "${{ env.PREREQUISITES_PATH }}\\${{ env.VBOX_NAME }}"
key: ${{ env.VBOX_NAME }}-${{ env.VBOX_MD5 }}

- name: Download prerequisite VirtualBox if needed
if: ${{ matrix.variant == 'vbox' && steps.cache-vbox-restore.outputs.cache-hit != 'true' }}
run: |
# Download Virtualbox prerequisite
Invoke-WebRequest -Uri "${{ env.VBOX_URL }}" -TimeoutSec 60 -OutFile "${{ env.PREREQUISITES_PATH }}\\${{ env.VBOX_NAME }}"
$md5 = (Get-FileHash "${{ env.PREREQUISITES_PATH }}\\${{ env.VBOX_NAME }}" -Algorithm MD5).Hash.ToLower()
if ( !($md5 -eq "${{ env.VBOX_MD5 }}") ) {
throw "VirtualBox installer download failed"
}

- name: Save prerequisite VirtualBox if needed
if: ${{ matrix.variant == 'vbox' && steps.cache-vbox-restore.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v3
with:
path: "${{ env.PREREQUISITES_PATH }}\\${{ env.VBOX_NAME }}"
key: ${{ env.VBOX_NAME }}-${{ env.VBOX_MD5 }}

- name: Download Client Artifact
if: ${{ success() }}
uses: actions/download-artifact@v3
with:
name: win_client_${{ matrix.arch }}_${{github.event.pull_request.head.sha}}
path: pkgs/

- name: Download Manager Artifact
if: ${{ success() }}
uses: actions/download-artifact@v3
with:
name: win_manager_${{ matrix.arch }}_${{github.event.pull_request.head.sha}}
path: pkgs/

- name: Decompress Artifacts
if: ${{ success() }}
run: |
pushd "${{ github.workspace }}\build"
7z x "${{ github.workspace }}\pkgs\win_client.7z"
7z x "${{ github.workspace }}\pkgs\win_manager.7z"

- name: Build installer
if: ${{ success() && matrix.variant != '' }}
run: |
$env:PATH = "${{ github.workspace }}\wix\bin\;" + $env:PATH
$env:WIX = "${{ github.workspace }}\wix\bin\"
pwsh -noninteractive -f .\installer.ps1 -Type "${{ matrix.arch }}_${{ matrix.variant }}" `
-Version "${{ steps.boinc-version-extract.outputs.boincVersionString }}" `
-CI -Certificate "${{ github.workspace }}\${{env.CERTIFICATE_SIGN}}" `
-CertificatePass "${{ env.CERTIFICATE_PASS }}"

- name: Build installer
if: ${{ success() && matrix.variant == '' }}
run: |
$env:PATH = "${{ github.workspace }}\wix\bin\;" + $env:PATH
$env:WIX = "${{ github.workspace }}\wix\bin\"
pwsh -noninteractive -f .\installer.ps1 -Type "${{ matrix.arch }}" `
-Version "${{ steps.boinc-version-extract.outputs.boincVersionString }}" `
-CI -Certificate "${{ github.workspace }}\${{env.CERTIFICATE_SIGN}}" `
-CertificatePass "${{ env.CERTIFICATE_PASS }}"

- name: Upload installer
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: boinc_bundle_${{ steps.boinc-version-extract.outputs.boincVersionString }}_${{ matrix.variant }}_${{ matrix.arch }}_${{github.event.pull_request.head.sha}}
path: build/*_windows_*.exe
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,13 @@ parts/
prime/
stage/
*.snap
Debug

# wix
win_build/installer_wix/boinc_binary_files.wxs
win_build/installer_wix/boinc_data_files.wxs
win_build/installer_wix/boinc_screensaver_files.wxs
win_build/installer_wix/BoincCA/x64/
win_build/installer_wix/BoincCA/ARM64/
**/obj/
**/bin/
2 changes: 1 addition & 1 deletion android/build_boinc_arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ if [ -n "$COMPILEBOINC" ]; then
cd android
mkdir -p "BOINC/app/src/main/assets"
cp "$BOINC/stage/usr/local/bin/boinc" "BOINC/app/src/main/assets/armeabi-v7a/boinc"
cp "$BOINC/win_build/installerv2/redist/all_projects_list.xml" "BOINC/app/src/main/assets/all_projects_list.xml"
cp "$BOINC/installer_wix/redist/all_projects_list.xml" "BOINC/app/src/main/assets/all_projects_list.xml"
cp "$BOINC/curl/ca-bundle.crt" "BOINC/app/src/main/assets/ca-bundle.crt"

echo "\e[1;32m===== BOINC for arm build done =====\e[0m"
Expand Down
2 changes: 1 addition & 1 deletion android/build_boinc_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if [ -n "$COMPILEBOINC" ]; then
cd android
mkdir -p "BOINC/app/src/main/assets"
cp "$BOINC/stage/usr/local/bin/boinc" "BOINC/app/src/main/assets/arm64-v8a/boinc"
cp "$BOINC/win_build/installerv2/redist/all_projects_list.xml" "BOINC/app/src/main/assets/all_projects_list.xml"
cp "$BOINC/installer_wix/redist/all_projects_list.xml" "BOINC/app/src/main/assets/all_projects_list.xml"
cp "$BOINC/curl/ca-bundle.crt" "BOINC/app/src/main/assets/ca-bundle.crt"

echo "\e[1;32m===== BOINC for arm64 build done =====\e[0m"
Expand Down
2 changes: 1 addition & 1 deletion android/build_boinc_armv6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ if [ -n "$COMPILEBOINC" ]; then
cd android
mkdir -p "BOINC/app/src/main/assets"
cp "$BOINC/stage/usr/local/bin/boinc" "BOINC/app/src/main/assets/armeabi/boinc"
cp "$BOINC/win_build/installerv2/redist/all_projects_list.xml" "BOINC/app/src/main/assets/all_projects_list.xml"
cp "$BOINC/installer_wix/redist/all_projects_list.xml" "BOINC/app/src/main/assets/all_projects_list.xml"
cp "$BOINC/curl/ca-bundle.crt" "BOINC/app/src/main/assets/ca-bundle.crt"

echo "\e[1;32m===== BOINC for armv6 build done =====\e[0m"
Expand Down
2 changes: 1 addition & 1 deletion android/build_boinc_x86.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ if [ -n "$COMPILEBOINC" ]; then
cd android
mkdir -p "BOINC/app/src/main/assets"
cp "$BOINC/stage/usr/local/bin/boinc" "BOINC/app/src/main/assets/x86/boinc"
cp "$BOINC/win_build/installerv2/redist/all_projects_list.xml" "BOINC/app/src/main/assets/all_projects_list.xml"
cp "$BOINC/installer_wix/redist/all_projects_list.xml" "BOINC/app/src/main/assets/all_projects_list.xml"
cp "$BOINC/curl/ca-bundle.crt" "BOINC/app/src/main/assets/ca-bundle.crt"

echo "\e[1;32m===== BOINC for x86 build done =====\e[0m"
Expand Down
2 changes: 1 addition & 1 deletion android/build_boinc_x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if [ -n "$COMPILEBOINC" ]; then
cd android
mkdir -p "BOINC/app/src/main/assets"
cp "$BOINC/stage/usr/local/bin/boinc" "BOINC/app/src/main/assets/x86_64/boinc"
cp "$BOINC/win_build/installerv2/redist/all_projects_list.xml" "BOINC/app/src/main/assets/all_projects_list.xml"
cp "$BOINC/installer_wix/redist/all_projects_list.xml" "BOINC/app/src/main/assets/all_projects_list.xml"
cp "$BOINC/curl/ca-bundle.crt" "BOINC/app/src/main/assets/ca-bundle.crt"

echo "\e[1;32m===== BOINC for x86-64 build done =====\e[0m"
Expand Down
6 changes: 5 additions & 1 deletion ci_tools/trailing_whitespaces_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ def check(directory, exclude_dirs, exclude_extensions, exclude_files, fix_errors
os.path.join(directory, "win_build", "Build"),
os.path.join(directory, "win_build", ".vs"),
os.path.join(directory, "win_build", "ipch"),
os.path.join(directory, "win_build", "installerv2", "redist"),
os.path.join(directory, "installer_wix", "redist"),
os.path.join(directory, "installer_wix", "bin"),
os.path.join(directory, "installer_wix", "Build"),
os.path.join(directory, "installer_wix", "obj"),
os.path.join(directory, "installer_wix", ".vs"),
os.path.join(directory, "zip", "unzip"),
os.path.join(directory, "zip", "zip"),
]
Expand Down
Loading
Loading