mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-18 05:18:05 -04:00
Update Docker build and GitHub actions to always build core libs (#1404)
This commit is contained in:
27
.github/actions/build-android-app/action.yml
vendored
27
.github/actions/build-android-app/action.yml
vendored
@@ -17,12 +17,37 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: apps/mobile-app/package-lock.json
|
||||
|
||||
- name: Build core libraries
|
||||
shell: bash
|
||||
run: |
|
||||
cd ./core
|
||||
chmod +x build-and-distribute.sh
|
||||
./build-and-distribute.sh
|
||||
|
||||
- name: Verify core library distribution
|
||||
shell: bash
|
||||
run: |
|
||||
TARGET_DIRS=(
|
||||
"apps/mobile-app/utils/dist/core/identity-generator"
|
||||
"apps/mobile-app/utils/dist/core/password-generator"
|
||||
"apps/mobile-app/utils/dist/core/models"
|
||||
"apps/mobile-app/utils/dist/core/vault"
|
||||
)
|
||||
for dir in "${TARGET_DIRS[@]}"; do
|
||||
if [ ! -d "$dir" ]; then
|
||||
echo "Error: Directory $dir does not exist"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo "Core library distribution verified"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
shell: bash
|
||||
|
||||
@@ -12,12 +12,44 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: apps/browser-extension/package-lock.json
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: wasm32-unknown-unknown
|
||||
|
||||
- name: Cache Rust dependencies
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: core/rust
|
||||
|
||||
- name: Install wasm-pack
|
||||
shell: bash
|
||||
run: cargo install wasm-pack --locked
|
||||
|
||||
- name: Build core libraries
|
||||
shell: bash
|
||||
run: |
|
||||
cd ./core
|
||||
chmod +x build-and-distribute.sh
|
||||
./build-and-distribute.sh
|
||||
|
||||
- name: Verify core library distribution
|
||||
shell: bash
|
||||
run: |
|
||||
# Verify critical rust WASM files exist
|
||||
if [ ! -f "apps/browser-extension/src/utils/dist/core/rust/aliasvault_core_bg.wasm" ]; then
|
||||
echo "Error: Rust WASM files not found in browser extension"
|
||||
exit 1
|
||||
fi
|
||||
echo "Core library distribution verified"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
shell: bash
|
||||
|
||||
69
.github/actions/build-core-libraries/action.yml
vendored
Normal file
69
.github/actions/build-core-libraries/action.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
name: "Build Core Libraries"
|
||||
description: "Builds and distributes all core libraries including TypeScript packages and Rust WASM"
|
||||
inputs:
|
||||
working-directory:
|
||||
description: "Working directory (default: repository root)"
|
||||
required: false
|
||||
default: "."
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: wasm32-unknown-unknown
|
||||
|
||||
- name: Install wasm-pack
|
||||
shell: bash
|
||||
run: cargo install wasm-pack --locked
|
||||
|
||||
- name: Build and distribute core libraries
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
run: |
|
||||
cd ./core
|
||||
chmod +x build-and-distribute.sh
|
||||
./build-and-distribute.sh
|
||||
|
||||
- name: Verify core library distribution
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
run: |
|
||||
# Check if files exist and were recently modified
|
||||
TARGET_DIRS=(
|
||||
"apps/browser-extension/src/utils/dist/core/identity-generator"
|
||||
"apps/browser-extension/src/utils/dist/core/password-generator"
|
||||
"apps/browser-extension/src/utils/dist/core/models"
|
||||
"apps/browser-extension/src/utils/dist/core/vault"
|
||||
"apps/browser-extension/src/utils/dist/core/rust"
|
||||
"apps/mobile-app/utils/dist/core/identity-generator"
|
||||
"apps/mobile-app/utils/dist/core/password-generator"
|
||||
"apps/mobile-app/utils/dist/core/models"
|
||||
"apps/mobile-app/utils/dist/core/vault"
|
||||
)
|
||||
|
||||
for dir in "${TARGET_DIRS[@]}"; do
|
||||
if [ ! -d "$dir" ]; then
|
||||
echo "Warning: Directory $dir does not exist (may be expected for some builds)"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Check if files were modified in the last 10 minutes
|
||||
find "$dir" -type f -mmin -10 | grep -q . || {
|
||||
echo "Warning: Files in $dir were not recently modified"
|
||||
}
|
||||
done
|
||||
|
||||
# Verify critical rust WASM files exist
|
||||
if [ ! -f "apps/browser-extension/src/utils/dist/core/rust/aliasvault_core_bg.wasm" ]; then
|
||||
echo "Error: Rust WASM files not found in browser extension"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Core library distribution verified"
|
||||
27
.github/actions/build-ios-app/action.yml
vendored
27
.github/actions/build-ios-app/action.yml
vendored
@@ -17,12 +17,37 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: apps/mobile-app/package-lock.json
|
||||
|
||||
- name: Build core libraries
|
||||
shell: bash
|
||||
run: |
|
||||
cd ./core
|
||||
chmod +x build-and-distribute.sh
|
||||
./build-and-distribute.sh
|
||||
|
||||
- name: Verify core library distribution
|
||||
shell: bash
|
||||
run: |
|
||||
TARGET_DIRS=(
|
||||
"apps/mobile-app/utils/dist/core/identity-generator"
|
||||
"apps/mobile-app/utils/dist/core/password-generator"
|
||||
"apps/mobile-app/utils/dist/core/models"
|
||||
"apps/mobile-app/utils/dist/core/vault"
|
||||
)
|
||||
for dir in "${TARGET_DIRS[@]}"; do
|
||||
if [ ! -d "$dir" ]; then
|
||||
echo "Error: Directory $dir does not exist"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo "Core library distribution verified"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
shell: bash
|
||||
|
||||
45
.github/workflows/browser-extension-build.yml
vendored
45
.github/workflows/browser-extension-build.yml
vendored
@@ -12,49 +12,16 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-shared-libraries:
|
||||
build-core-libraries:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Build and distribute core libraries
|
||||
run: |
|
||||
cd ./core
|
||||
chmod +x build-and-distribute.sh
|
||||
./build-and-distribute.sh
|
||||
|
||||
- name: Verify core library distribution
|
||||
run: |
|
||||
# Check if files exist and were recently modified
|
||||
TARGET_DIRS=(
|
||||
"apps/browser-extension/src/utils/dist/core/identity-generator"
|
||||
"apps/browser-extension/src/utils/dist/core/password-generator"
|
||||
"apps/browser-extension/src/utils/dist/core/models"
|
||||
"apps/browser-extension/src/utils/dist/core/vault"
|
||||
)
|
||||
|
||||
for dir in "${TARGET_DIRS[@]}"; do
|
||||
if [ ! -d "$dir" ]; then
|
||||
echo "❌ Directory $dir does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if files were modified in the last 5 minutes
|
||||
find "$dir" -type f -mmin -5 | grep -q . || {
|
||||
echo "❌ Files in $dir were not recently modified"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
echo "✅ Shared library distribution verified"
|
||||
- name: Build Core Libraries
|
||||
uses: ./.github/actions/build-core-libraries
|
||||
|
||||
build-chrome-extension:
|
||||
needs: build-shared-libraries
|
||||
needs: build-core-libraries
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -65,7 +32,7 @@ jobs:
|
||||
browser: chrome
|
||||
|
||||
build-firefox-extension:
|
||||
needs: build-shared-libraries
|
||||
needs: build-core-libraries
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -76,7 +43,7 @@ jobs:
|
||||
browser: firefox
|
||||
|
||||
build-edge-extension:
|
||||
needs: build-shared-libraries
|
||||
needs: build-core-libraries
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
40
.github/workflows/e2e-tests.yml
vendored
40
.github/workflows/e2e-tests.yml
vendored
@@ -105,7 +105,26 @@ jobs:
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: wasm32-unknown-unknown
|
||||
|
||||
- name: Cache Rust dependencies
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: core/rust
|
||||
|
||||
- name: Install wasm-pack
|
||||
run: cargo install wasm-pack --locked
|
||||
|
||||
- name: Build core libraries
|
||||
run: |
|
||||
cd ./core
|
||||
chmod +x build-and-distribute.sh
|
||||
./build-and-distribute.sh
|
||||
|
||||
- name: Install .NET dependencies
|
||||
working-directory: apps/server
|
||||
run: dotnet workload install wasm-tools
|
||||
|
||||
@@ -158,6 +177,25 @@ jobs:
|
||||
cache: 'npm'
|
||||
cache-dependency-path: apps/browser-extension/package-lock.json
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: wasm32-unknown-unknown
|
||||
|
||||
- name: Cache Rust dependencies
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: core/rust
|
||||
|
||||
- name: Install wasm-pack
|
||||
run: cargo install wasm-pack --locked
|
||||
|
||||
- name: Build core libraries
|
||||
run: |
|
||||
cd ./core
|
||||
chmod +x build-and-distribute.sh
|
||||
./build-and-distribute.sh
|
||||
|
||||
- name: Install .NET dependencies
|
||||
working-directory: apps/server
|
||||
run: dotnet workload install wasm-tools
|
||||
|
||||
6
.github/workflows/mobile-app-build.yml
vendored
6
.github/workflows/mobile-app-build.yml
vendored
@@ -99,6 +99,12 @@ jobs:
|
||||
cache: 'npm'
|
||||
cache-dependency-path: apps/mobile-app/package-lock.json
|
||||
|
||||
- name: Build core libraries
|
||||
run: |
|
||||
cd ../../core
|
||||
chmod +x build-and-distribute.sh
|
||||
./build-and-distribute.sh
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
|
||||
Reference in New Issue
Block a user