Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Lord committed May 27, 2024
1 parent a964e3b commit 26d4d65
Show file tree
Hide file tree
Showing 9 changed files with 630 additions and 4,108 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
paths:
- ".github/workflows/build-windows.yml"

env:
DYNAMIC_OPENSSL_VERSION: 3_3_0

jobs:
build:
name: Build
Expand All @@ -28,12 +31,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup OpenSSL 1.1.1 for Win32
if: matrix.arch == 'Win32'
- name: Setup OpenSSL v${{ env.DYNAMIC_OPENSSL_VERSION }} (dynamic)
# https://github.com/actions/runner-images/blob/main/images/windows/scripts/build/Install-OpenSSL.ps1 & Win32OpenSSL.exe /? & Win32OpenSSL.exe /LOG="a.log" /SAVEINF="inf.inf"
run: |
$url = "https://slproweb.com/download/Win32OpenSSL-1_1_1w.exe"
$path = "C:\temp\Win32OpenSSL.exe"
$url = "https://slproweb.com/download/Win${{ matrix.arch == 'Win32' && '32' || matrix.arch == 'Win64' && '64' }}OpenSSL-${{ $env.DYNAMIC_OPENSSL_VERSION }}.exe"
$path = "C:\OpenSSL.exe"
Invoke-WebRequest -Uri $url -OutFile $path
Start-Process -FilePath $path -ArgumentList "/silent","/sp-","/suppressmsgboxes","/DIR=`"$env:ProgramFiles\OpenSSL`"","/TASKS=copytobin" -Wait
Expand All @@ -50,7 +52,7 @@ jobs:
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Setup OpenSSL (static)
- name: Setup OpenSSL latest (static)
# https://blog.hamaluik.ca/posts/statically-linking-sqlcipher-on-windows
run: |
vcpkg install openssl:${{ env.VCPKG_DEFAULT_TRIPLET }} --binarysource="clear;x-gha,readwrite"
Expand Down Expand Up @@ -87,6 +89,12 @@ jobs:
copy sqlite3.c,sqlite3.h,sqlcipher.dll,sqlcipher.lib,sqlcipher-dynamic.exe,"$env:ProgramFiles\OpenSSL\libcrypto-*" sqlcipher
working-directory: C:\dev\SQLCipher-${{ matrix.arch }}

- name: Copy LICENSE
# ref: https://github.com/actions/runner-images/blob/main/images/windows/scripts/build/Install-OpenSSL.ps1#L12
run: |
copy LICENSE* sqlcipher
working-directory: C:\dev\SQLCipher-${{ matrix.arch }}

- name: Prepare artifacts
run: |
Compress-Archive -Path C:\dev\SQLCipher-${{ matrix.arch }}\sqlcipher -DestinationPath build-artifacts-${{ matrix.arch }}.zip
Expand All @@ -104,4 +112,4 @@ jobs:
tag_name: latest
files: |
build-artifacts-${{ matrix.arch }}.zip
C:\dev\SQLCipher-${{ matrix.arch }}\sqlcipher-${{ matrix.arch == 'Win32' && 'x86' || matrix.arch == 'Win64' && 'x64' }}.exe
C:/dev/SQLCipher-${{ matrix.arch }}/sqlcipher-${{ matrix.arch == 'Win32' && 'x86' || matrix.arch == 'Win64' && 'x64' }}.exe
1,079 changes: 21 additions & 1,058 deletions LICENSE

Large diffs are not rendered by default.

27 changes: 0 additions & 27 deletions LICENSE-EXTENSIONS

This file was deleted.

Loading

0 comments on commit 26d4d65

Please sign in to comment.