Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten committed Dec 20, 2024
1 parent af9948a commit 1830775
Showing 1 changed file with 52 additions and 38 deletions.
90 changes: 52 additions & 38 deletions .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ on:
pull_request_target:
types: [opened, synchronize]
branches-ignore:
- 'l10n_master'
- 'cf-pages'
- "l10n_master"
- "cf-pages"
paths:
- 'apps/desktop/**'
- 'libs/**'
- '*'
- '!*.md'
- '!*.txt'
- '.github/workflows/build-desktop.yml'
- "apps/desktop/**"
- "libs/**"
- "*"
- "!*.md"
- "!*.txt"
- ".github/workflows/build-desktop.yml"
push:
branches:
- 'main'
- 'rc'
- 'hotfix-rc-desktop'
- "main"
- "rc"
- "hotfix-rc-desktop"
paths:
- 'apps/desktop/**'
- 'libs/**'
- '*'
- '!*.md'
- '!*.txt'
- '.github/workflows/build-desktop.yml'
- "apps/desktop/**"
- "libs/**"
- "*"
- "!*.md"
- "!*.txt"
- ".github/workflows/build-desktop.yml"
workflow_dispatch:
inputs:
sdk_branch:
Expand Down Expand Up @@ -138,6 +138,28 @@ jobs:
NODE_VERSION=${NODE_NVMRC/v/''}
echo "node_version=$NODE_VERSION" >> $GITHUB_OUTPUT
linux-desktop-native:
name: Desktop Native Linux Build
runs-on: alpine
needs: setup
defaults:
run:
working-directory: apps/desktop/desktop_native
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up environment
run: |
apk add --no-cache \
build-base \
rust \
cargo
- name: Build Native Module
run: |
cargo build --release --target x86_64-unknown-linux-musl
linux:
name: Linux Build
# Note, before updating the ubuntu version of the workflow, ensure the snap base image
Expand All @@ -163,14 +185,14 @@ jobs:
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
cache: "npm"
cache-dependency-path: "**/package-lock.json"
node-version: ${{ env._NODE_VERSION }}

- name: Set up environment
run: |
sudo apt-get update
sudo apt-get -y install pkg-config libxss-dev rpm musl-dev musl-tools flatpak flatpak-builder
sudo apt-get -y install pkg-config libxss-dev rpm flatpak flatpak-builder
- name: Set up Snap
run: sudo snap install snapcraft --classic
Expand Down Expand Up @@ -286,7 +308,6 @@ jobs:
path: apps/desktop/dist/com.bitwarden.desktop.flatpak
if-no-files-found: error


windows:
name: Windows Build
runs-on: windows-2022
Expand All @@ -309,8 +330,8 @@ jobs:
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
cache: "npm"
cache-dependency-path: "**/package-lock.json"
node-version: ${{ env._NODE_VERSION }}

- name: Install AST
Expand Down Expand Up @@ -518,7 +539,6 @@ jobs:
path: apps/desktop/dist/nsis-web/${{ needs.setup.outputs.release_channel }}.yml
if-no-files-found: error


macos-build:
name: MacOS Build
runs-on: macos-13
Expand All @@ -540,8 +560,8 @@ jobs:
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
cache: "npm"
cache-dependency-path: "**/package-lock.json"
node-version: ${{ env._NODE_VERSION }}

- name: Set up Node-gyp
Expand Down Expand Up @@ -697,14 +717,12 @@ jobs:
- name: Build application (dev)
run: npm run build


browser-build:
name: Browser Build
needs: setup
uses: ./.github/workflows/build-browser.yml
secrets: inherit


macos-package-github:
name: MacOS Package GitHub Release Assets
runs-on: macos-13
Expand All @@ -728,8 +746,8 @@ jobs:
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
cache: "npm"
cache-dependency-path: "**/package-lock.json"
node-version: ${{ env._NODE_VERSION }}

- name: Set up Node-gyp
Expand Down Expand Up @@ -945,7 +963,6 @@ jobs:
path: apps/desktop/dist/${{ needs.setup.outputs.release_channel }}-mac.yml
if-no-files-found: error


macos-package-mas:
name: MacOS Package Prod Release Asset
runs-on: macos-13
Expand All @@ -969,8 +986,8 @@ jobs:
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
cache: "npm"
cache-dependency-path: "**/package-lock.json"
node-version: ${{ env._NODE_VERSION }}

- name: Set up Node-gyp
Expand Down Expand Up @@ -1212,7 +1229,6 @@ jobs:
SLACK_BOT_TOKEN: ${{ steps.retrieve-slack-secret.outputs.slack-bot-token }}
BUILD_NUMBER: ${{ needs.setup.outputs.build_number }}


macos-package-dev:
name: MacOS Package Dev Release Asset
runs-on: macos-13
Expand All @@ -1236,8 +1252,8 @@ jobs:
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
cache: "npm"
cache-dependency-path: "**/package-lock.json"
node-version: ${{ env._NODE_VERSION }}

- name: Set up Node-gyp
Expand Down Expand Up @@ -1430,7 +1446,6 @@ jobs:
path: apps/desktop/dist/mas-dev-universal/Bitwarden-${{ env._PACKAGE_VERSION }}-masdev-universal.zip
if-no-files-found: error


crowdin-push:
name: Crowdin Push
if: github.ref == 'refs/heads/main'
Expand Down Expand Up @@ -1470,7 +1485,6 @@ jobs:
upload_sources: true
upload_translations: false


check-failures:
name: Check for failures
if: always()
Expand Down

0 comments on commit 1830775

Please sign in to comment.