mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 11:43:46 +00:00
Resolve cross-compile for rust (#1481)
This commit is contained in:
106
.github/workflows/build.yml
vendored
106
.github/workflows/build.yml
vendored
@@ -149,6 +149,20 @@ jobs:
|
||||
- name: Install Node dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Cache Native Module
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # v3.0.2
|
||||
id: cache
|
||||
with:
|
||||
path: desktop_native/dist
|
||||
key: rust-${{ runner.os }}-${{ hashFiles('desktop_native/**/*') }}
|
||||
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: './desktop_native'
|
||||
run: |
|
||||
npm ci
|
||||
npm run build:cross-platform
|
||||
|
||||
- name: Build application
|
||||
run: npm run dist:lin
|
||||
|
||||
@@ -228,11 +242,18 @@ jobs:
|
||||
shell: pwsh
|
||||
run: choco install checksum --no-progress
|
||||
|
||||
- name: Rust
|
||||
shell: pwsh
|
||||
run: |
|
||||
rustup target install i686-pc-windows-msvc
|
||||
rustup target install aarch64-pc-windows-msvc
|
||||
|
||||
- name: Print environment
|
||||
run: |
|
||||
node --version
|
||||
npm --version
|
||||
choco --version
|
||||
rustup show
|
||||
|
||||
- name: Login to Azure
|
||||
uses: Azure/login@1f63701bf3e6892515f1b7ce2d2bf1708b46beaf
|
||||
@@ -253,6 +274,20 @@ jobs:
|
||||
- name: Install Node dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Cache Native Module
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # v3.0.2
|
||||
id: cache
|
||||
with:
|
||||
path: desktop_native/dist
|
||||
key: rust-${{ runner.os }}-${{ hashFiles('desktop_native/**/*') }}
|
||||
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: './desktop_native'
|
||||
run: |
|
||||
npm ci
|
||||
npm run build:cross-platform
|
||||
|
||||
- name: Build & Sign (dev)
|
||||
env:
|
||||
ELECTRON_BUILDER_SIGN: 1
|
||||
@@ -404,10 +439,15 @@ jobs:
|
||||
npm install -g node-gyp
|
||||
node-gyp install $(node -v)
|
||||
|
||||
- name: Rust
|
||||
shell: pwsh
|
||||
run: rustup target install aarch64-apple-darwin
|
||||
|
||||
- name: Print environment
|
||||
run: |
|
||||
node --version
|
||||
npm --version
|
||||
rustup show
|
||||
echo "GitHub ref: $GITHUB_REF"
|
||||
echo "GitHub event: $GITHUB_EVENT"
|
||||
|
||||
@@ -496,6 +536,20 @@ jobs:
|
||||
$package.build | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER";
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content $env:GITHUB_WORKSPACE\package.json;
|
||||
|
||||
- name: Cache Native Module
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # v3.0.2
|
||||
id: cache
|
||||
with:
|
||||
path: desktop_native/dist
|
||||
key: rust-${{ runner.os }}-${{ hashFiles('desktop_native/**/*') }}
|
||||
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: './desktop_native'
|
||||
run: |
|
||||
npm ci
|
||||
npm run build:cross-platform
|
||||
|
||||
- name: Install Node dependencies
|
||||
run: npm ci
|
||||
|
||||
@@ -548,10 +602,15 @@ jobs:
|
||||
npm install -g node-gyp
|
||||
node-gyp install $(node -v)
|
||||
|
||||
- name: Rust
|
||||
shell: pwsh
|
||||
run: rustup target install aarch64-apple-darwin
|
||||
|
||||
- name: Print environment
|
||||
run: |
|
||||
node --version
|
||||
npm --version
|
||||
rustup show
|
||||
echo "GitHub ref: $GITHUB_REF"
|
||||
echo "GitHub event: $GITHUB_EVENT"
|
||||
|
||||
@@ -640,6 +699,20 @@ jobs:
|
||||
$package.build | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER";
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content $env:GITHUB_WORKSPACE\package.json;
|
||||
|
||||
- name: Cache Native Module
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # v3.0.2
|
||||
id: cache
|
||||
with:
|
||||
path: desktop_native/dist
|
||||
key: rust-${{ runner.os }}-${{ hashFiles('desktop_native/**/*') }}
|
||||
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: './desktop_native'
|
||||
run: |
|
||||
npm ci
|
||||
npm run build:cross-platform
|
||||
|
||||
- name: NPM install
|
||||
run: npm ci
|
||||
|
||||
@@ -735,10 +808,15 @@ jobs:
|
||||
npm install -g node-gyp
|
||||
node-gyp install $(node -v)
|
||||
|
||||
- name: Rust
|
||||
shell: pwsh
|
||||
run: rustup target install aarch64-apple-darwin
|
||||
|
||||
- name: Print environment
|
||||
run: |
|
||||
node --version
|
||||
npm --version
|
||||
rustup show
|
||||
echo "GitHub ref: $GITHUB_REF"
|
||||
echo "GitHub event: $GITHUB_EVENT"
|
||||
|
||||
@@ -827,6 +905,20 @@ jobs:
|
||||
$package.build | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER";
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content $env:GITHUB_WORKSPACE\package.json;
|
||||
|
||||
- name: Cache Native Module
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # v3.0.2
|
||||
id: cache
|
||||
with:
|
||||
path: desktop_native/dist
|
||||
key: rust-${{ runner.os }}-${{ hashFiles('desktop_native/**/*') }}
|
||||
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: './desktop_native'
|
||||
run: |
|
||||
npm ci
|
||||
npm run build:cross-platform
|
||||
|
||||
- name: NPM install
|
||||
run: npm ci
|
||||
|
||||
@@ -1006,6 +1098,20 @@ jobs:
|
||||
$package.build | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER";
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content $env:GITHUB_WORKSPACE\package.json;
|
||||
|
||||
- name: Cache Native Module
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # v3.0.2
|
||||
id: cache
|
||||
with:
|
||||
path: desktop_native/dist
|
||||
key: rust-${{ runner.os }}-${{ hashFiles('desktop_native/**/*') }}
|
||||
|
||||
- name: Build Native Module
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
working-directory: './desktop_native'
|
||||
run: |
|
||||
npm ci
|
||||
npm run build:cross-platform
|
||||
|
||||
- name: NPM install
|
||||
run: npm ci
|
||||
|
||||
|
||||
Reference in New Issue
Block a user