File tree Expand file tree Collapse file tree 3 files changed +33
-3
lines changed
Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 2626
2727 - name : Build CLI ${{ inputs.target }} target
2828 uses :
houseabsolute/[email protected] 29- # Cross-rs does not directly support cross compilation with macOS targets
30- if : ${{ !contains(inputs.target, 'darwin') }}
29+ # Cross-rs does not directly support cross compilation with macOS and Windows targets
30+ if : ${{ !contains(inputs.target, 'darwin') && !contains(inputs.target, 'windows') }}
3131 with :
3232 command : build
3333 target : ${{ inputs.target }}
4343 run : |
4444 cargo build -p trunk-analytics-cli --profile=${{ inputs.profile }} --target=${{ inputs.target }} ${{ (inputs.force-sentry-dev == 'true' && '--features force-sentry-env-dev') || '' }}
4545
46+ - name : Build CLI ${{ inputs.target }} target
47+ shell : bash
48+ if : ${{ contains(inputs.target, 'windows') }}
49+ # NOTE: DO NOT BUILD WORKSPACE OTHERWISE THE CLI MAY BE LINKED TO UNNECESSARY LIBRARIES
50+ run : |
51+ cargo build -p trunk-analytics-cli --profile=${{ inputs.profile }} --target=${{ inputs.target }} ${{ (inputs.force-sentry-dev == 'true' && '--features force-sentry-env-dev') || '' }}
52+ env :
53+ OPENSSL_STATIC : 1
54+ OPENSSL_NO_VENDOR : 1
55+
4656 - name : Create binary with debug info
4757 shell : bash
4858 run : |
Original file line number Diff line number Diff line change 6767 else
6868 cross build -p bundle --profile=release-with-debug --target=${{ inputs.target }} --features build-binary
6969 fi
70+ env :
71+ OPENSSL_STATIC : ${{ contains(inputs.os-name, 'windows') && '1' || '' }}
72+ OPENSSL_NO_VENDOR : ${{ contains(inputs.os-name, 'windows') && '1' || '' }}
7073
7174 - name : Build XCResult CLI
7275 shell : bash
7679 else
7780 cross build -p xcresult --profile=release-with-debug --target=${{ inputs.target }}
7881 fi
82+ env :
83+ OPENSSL_STATIC : ${{ contains(inputs.os-name, 'windows') && '1' || '' }}
84+ OPENSSL_NO_VENDOR : ${{ contains(inputs.os-name, 'windows') && '1' || '' }}
7985
8086 - name : Build Codeowners CLI
8187 shell : bash
8591 else
8692 cross build -p codeowners --profile=release-with-debug --target=${{ inputs.target }}
8793 fi
94+ env :
95+ OPENSSL_STATIC : ${{ contains(inputs.os-name, 'windows') && '1' || '' }}
96+ OPENSSL_NO_VENDOR : ${{ contains(inputs.os-name, 'windows') && '1' || '' }}
Original file line number Diff line number Diff line change @@ -13,12 +13,24 @@ inputs:
1313runs :
1414 using : composite
1515 steps :
16+ - name : Install OpenSSL with vcpkg
17+ shell : pwsh
18+ run : |
19+ vcpkg install openssl:x64-windows-static
20+ echo "OPENSSL_DIR=$env:VCPKG_INSTALLATION_ROOT\installed\x64-windows-static" >> $env:GITHUB_ENV
21+ echo "OPENSSL_STATIC=1" >> $env:GITHUB_ENV
22+ echo "OPENSSL_NO_VENDOR=1" >> $env:GITHUB_ENV
23+
1624 - name : Build CLI ${{ inputs.target }} target
1725 uses : ./.github/actions/build_cli_target
1826 with :
1927 target : ${{ inputs.target }}
2028 profile : ${{ inputs.profile }}
2129 force-sentry-dev : ${{ inputs.force-sentry-dev }}
30+ env :
31+ OPENSSL_DIR : ${{ env.OPENSSL_DIR }}
32+ OPENSSL_STATIC : 1
33+ OPENSSL_NO_VENDOR : 1
2234
2335 - name : Check binary exists
2436 shell : pwsh
2941 exit 1
3042 }
3143 Get-Item $binaryPath | Select-Object FullName, Length
32-
You can’t perform that action at this time.
0 commit comments