Skip to content

Commit

Permalink
Merge branch 'main' of github.com:bitwarden/sdk-internal into repo-sp…
Browse files Browse the repository at this point in the history
…lit-cleanup

# Conflicts:
#	.github/CODEOWNERS
#	.github/workflows/build-cli-docker.yml
#	.github/workflows/build-cli.yml
#	.github/workflows/build-cpp.yml
#	.github/workflows/build-dotnet.yml
#	.github/workflows/build-go.yaml
#	.github/workflows/build-java.yml
#	.github/workflows/build-napi.yml
#	.github/workflows/build-python-wheels.yml
#	.github/workflows/build-ruby.yml
#	.github/workflows/build-rust-cross-platform.yml
#	.github/workflows/build-wasm.yml
#	.github/workflows/publish-bws.yml
#	.github/workflows/publish-dotnet.yml
#	.github/workflows/publish-java.yml
#	.github/workflows/publish-napi.yml
#	.github/workflows/publish-php.yml
#	.github/workflows/publish-python.yml
#	.github/workflows/publish-ruby.yml
#	.github/workflows/publish-wasm.yml
#	.github/workflows/release-bws.yml
#	.github/workflows/release-cpp.yml
#	.github/workflows/release-dotnet.yml
#	.github/workflows/release-go.yml
#	.github/workflows/release-java.yml
#	.github/workflows/release-napi.yml
#	.github/workflows/release-python.yml
#	.github/workflows/release-wasm.yml
#	Cargo.lock
#	crates/bitwarden-wasm-internal/Cargo.toml
#	crates/bitwarden-wasm/Cargo.toml
#	crates/bitwarden/CHANGELOG.md
#	crates/bws/CHANGELOG.md
#	languages/java/build.gradle
#	package-lock.json
#	package.json
  • Loading branch information
Hinton committed Oct 21, 2024
2 parents c75f247 + 38ecf13 commit 97566fb
Show file tree
Hide file tree
Showing 50 changed files with 651 additions and 250 deletions.
14 changes: 12 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@
#
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# BRE for publish workflow changes
.github/workflows/publish-*.yml @bitwarden/dept-bre

# DevOps for Actions and other workflow changes.
.github/workflows @bitwarden/dept-devops
# Shared workflows ownership

## Multiple owners
.github/workflows/build-android.yml
.github/workflows/build-rust-crates.yml
.github/workflows/build-swift.yml
.github/workflows/build-wasm-internal.yml
.github/workflows/release-rust-crates.yml
.github/workflows/release-swift.yml
.github/workflows/version-bump.yml

# Secrets Manager team
crates/bitwarden-sm @bitwarden/team-secrets-manager-dev
13 changes: 6 additions & 7 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Build Android

on:
Expand All @@ -25,15 +24,15 @@ jobs:
- target: i686-linux-android
steps:
- name: Checkout repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Install rust
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
with:
toolchain: stable

- name: Cache cargo registry
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
key: ${{ matrix.settings.target }}-cargo

Expand All @@ -46,7 +45,7 @@ jobs:
run: cross build -p bitwarden-uniffi --release --target=${{ matrix.settings.target }}

- name: Upload artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: android-${{ matrix.settings.target }}
path: ./target/${{ matrix.settings.target }}/release/libbitwarden_uniffi.so
Expand All @@ -57,14 +56,14 @@ jobs:
needs: build
steps:
- name: Checkout repo (PR)
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
if: github.event_name == 'pull_request'
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}

- name: Checkout repo (Push)
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
if: github.event_name == 'push'
with:
fetch-depth: 0
Expand All @@ -75,7 +74,7 @@ jobs:
toolchain: stable

- name: Cache cargo registry
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
key: cargo-combine-cache

Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/build-rust-crates.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Build Rust crates

on:
Expand Down Expand Up @@ -34,15 +33,15 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Install rust
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
with:
toolchain: stable

- name: Cache cargo registry
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5

- name: Build
run: cargo build -p ${{ matrix.package }} --release
Expand All @@ -56,15 +55,15 @@ jobs:
needs: build
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Install rust
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
with:
toolchain: stable

- name: Cache cargo registry
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5

- name: Install cargo-release
run: cargo install cargo-release
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build-swift.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Build Swift Package

on:
Expand All @@ -17,7 +16,7 @@ jobs:
package_version: ${{ steps.retrieve-version.outputs.package_version }}
steps:
- name: Checkout repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Get Package Version
id: retrieve-version
Expand All @@ -33,15 +32,15 @@ jobs:
_VERSION: ${{ needs.version.outputs.package_version }}
steps:
- name: Checkout repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Install rust
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
with:
toolchain: stable

- name: Cache cargo registry
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
key: sdk-swift-cargo

Expand All @@ -67,14 +66,14 @@ jobs:
cp -rf languages/swift/BitwardenFFI.xcframework artifacts
- name: Upload BitwardenFFI.xcframework artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: BitwardenFFI-${{ env._VERSION }}-${{ steps.build.outputs.short-sha }}.xcframework
path: artifacts
if-no-files-found: error

- name: Upload BitwardenSdk sources
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: BitwardenSdk-${{ env._VERSION }}-${{ steps.build.outputs.short-sha }}-sources
path: languages/swift/Sources/BitwardenSdk
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build-wasm-internal.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Build @bitwarden/sdk-internal

on:
Expand All @@ -22,7 +21,7 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup Node
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
Expand All @@ -37,22 +36,22 @@ jobs:
- name: Install rust
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
with:
toolchain: stable
toolchain: 1.81.0
targets: wasm32-unknown-unknown

- name: Cache cargo registry
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
key: wasm-cargo-cache

- name: Install wasm-bindgen-cli
run: cargo install wasm-bindgen-cli
run: cargo install wasm-bindgen-cli --version 0.2.95

- name: Build
run: ./build.sh -r

- name: Upload artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: sdk-internal
path: ${{ github.workspace }}/languages/js/sdk-internal/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cloc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Set up cloc
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/delete-old-packages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Delete old packages

on:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/direct-minimal-versions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Direct Minimum Version

on:
Expand Down Expand Up @@ -36,7 +35,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Install rust
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
Expand All @@ -45,7 +44,7 @@ jobs:
targets: ${{ matrix.settings.target }}

- name: Cache cargo registry
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
key: dmv-${{ matrix.settings.target }}-cargo-${{ matrix.settings.os }}

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/enforce-labels.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Enforce PR labels

on:
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/generate_schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Install rust
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
Expand All @@ -37,61 +37,61 @@ jobs:
run: npm ci

- name: Cache cargo registry
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5

- name: NPM Schemas
run: npm run schemas

- name: Upload ts schemas artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: schemas.ts
path: ${{ github.workspace }}/languages/js/sdk-client/src/schemas.ts
if-no-files-found: error

- name: Upload c# schemas artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: schemas.cs
path: ${{ github.workspace }}/languages/csharp/Bitwarden.Sdk/schemas.cs
if-no-files-found: error

- name: Upload python schemas artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: schemas.py
path: ${{ github.workspace }}/languages/python/bitwarden_sdk/schemas.py
if-no-files-found: error

- name: Upload ruby schemas artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: schemas.rb
path: ${{ github.workspace }}/languages/ruby/bitwarden_sdk_secrets/lib/schemas.rb
if-no-files-found: error

- name: Upload json schemas artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: sdk-schemas-json
path: ${{ github.workspace }}/support/schemas/*
if-no-files-found: error

- name: Upload Go schemas artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: schemas.go
path: ${{ github.workspace }}/languages/go/schema.go

- name: Upload java schemas artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: sdk-schemas-java
path: ${{ github.workspace }}/languages/java/src/main/java/com/bitwarden/sdk/schema/*
if-no-files-found: error

- name: Upload cpp schemas artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: sdk-schemas-cpp
path: ${{ github.workspace }}/languages/cpp/include/schemas.hpp
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Install rust
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
Expand All @@ -30,7 +30,7 @@ jobs:
rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
- name: Cache cargo registry
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5

- name: Cargo fmt
run: cargo +nightly fmt --check
Expand All @@ -45,7 +45,7 @@ jobs:
RUSTFLAGS: "-D warnings"

- name: Upload Clippy results to GitHub
uses: github/codeql-action/upload-sarif@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
sarif_file: clippy_result.sarif

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/memory-testing.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Test for memory leaks

on:
Expand All @@ -22,7 +21,7 @@ jobs:

steps:
- name: Check out repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Set up gdb
run: |
Expand All @@ -35,7 +34,7 @@ jobs:
toolchain: stable

- name: Cache cargo registry
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
key: memtest-cargo

Expand Down
Loading

0 comments on commit 97566fb

Please sign in to comment.