Skip to content

build(deps-dev): bump electron from 34.2.0 to 35.2.0 in /exomind/web #5431

build(deps-dev): bump electron from 34.2.0 to 35.2.0 in /exomind/web

build(deps-dev): bump electron from 34.2.0 to 35.2.0 in /exomind/web #5431

Workflow file for this run

name: Push test
on:
pull_request:
push:
branches:
- master
- "v0.*"
- "v1.*"
# TODO: try to move common chunks to composite actions: https://github.com/orgs/community/discussions/11771
# TODO: ios release vs debug
# TODO: ios upload archive
env:
CARGO_TERM_COLOR: always
jobs:
rust_checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy & check
uses: clechasseur/rs-clippy-check@v3
with:
args: --all-features --workspace
rust_tests:
strategy:
fail-fast: true
matrix:
pair:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-14
runs-on: ${{ matrix.pair.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Tests
run: ./tools/test.sh
rust_tests_coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
- name: Test coverage
run: |
./tools/coverage.sh lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: lcov.info
fail_ci_if_error: false
exo_build:
strategy:
fail-fast: true
matrix:
pair:
- target: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
cross: true
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
cross: true
- target: aarch64-apple-darwin
os: macos-14
cross: false
runs-on: ${{ matrix.pair.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: ${{ matrix.pair.target }}
- uses: Swatinem/rust-cache@v2
- name: Install master version of cross # TODO: Remove me once new cross is released
run: |
cargo install cross --locked --git https://github.com/cross-rs/cross
- name: Set Debug or Release Mode
run: |
if [[ "${GITHUB_REF}" == "refs/heads/master" || "${GITHUB_REF}" == refs/tags/* ]]; then
echo "BUILD_PROFILE=release" >> $GITHUB_ENV
else
echo "BUILD_PROFILE=debug" >> $GITHUB_ENV
fi
- name: Cargo build
run: |
TOOL="cargo"
if [[ "${{ matrix.pair.cross }}" == "true" ]]; then
TOOL="cross"
fi
if [[ "${{ env.BUILD_PROFILE }}" == "release" ]]; then
$TOOL build -p exo --release --target ${{ matrix.pair.target }}
else
$TOOL build -p exo --target ${{ matrix.pair.target }}
fi
cp target/${{ matrix.pair.target }}/${{ env.BUILD_PROFILE }}/exo exo.${{ matrix.pair.target }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: exo-${{ matrix.pair.target }}
path: exo.${{ matrix.pair.target }}
if-no-files-found: error
exm_build:
strategy:
fail-fast: true
matrix:
pair:
- target: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
cross: true
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
cross: true
- target: aarch64-apple-darwin
os: macos-14
cross: false
runs-on: ${{ matrix.pair.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: ${{ matrix.pair.target }}
- uses: Swatinem/rust-cache@v2
- name: Install master version of cross # TODO: Remove me once new cross is released
run: |
cargo install cross --locked --git https://github.com/cross-rs/cross
- name: Set Debug or Release Mode
run: |
if [[ "${GITHUB_REF}" == "refs/heads/master" || "${GITHUB_REF}" == refs/tags/* ]]; then
echo "BUILD_PROFILE=release" >> $GITHUB_ENV
else
echo "BUILD_PROFILE=debug" >> $GITHUB_ENV
fi
- name: Cargo build
run: |
TOOL="cargo"
if [[ "${{ matrix.pair.cross }}" == "true" ]]; then
TOOL="cross"
fi
if [[ "${{ env.BUILD_PROFILE }}" == "release" ]]; then
$TOOL build -p exm --release --target ${{ matrix.pair.target }}
else
$TOOL build -p exm --target ${{ matrix.pair.target }}
fi
cp target/${{ matrix.pair.target }}/${{ env.BUILD_PROFILE }}/exm exm.${{ matrix.pair.target }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: exm-${{ matrix.pair.target }}
path: exm.${{ matrix.pair.target }}
if-no-files-found: error
exocore_docker_build:
runs-on: ubuntu-latest
needs: [exo_build]
steps:
- uses: actions/checkout@v4
- name: Download exo
uses: actions/download-artifact@v4
with:
name: exo-x86_64-unknown-linux-gnu
- name: Download exo
uses: actions/download-artifact@v4
with:
name: exo-armv7-unknown-linux-gnueabihf
- name: Download release files
run: |
set -x
mkdir assets/
mv exo.x86_64-unknown-linux-gnu assets/exo-amd64
mv exo.armv7-unknown-linux-gnueabihf assets/exo-arm
chmod a+x assets/exo*
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.actor != 'dependabot[bot]' }} # dependabot doesn't have access to secrets
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Setup Docker builder
run: |
set -x
# Allows build in arm for qemu
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# Create builder
export DOCKER_CLI_EXPERIMENTAL=enabled
docker buildx create --use --name exocore-builder
- name: Build & publish Docker
run: |
set -x
TAG="$(git rev-parse --short HEAD)"
cd $GITHUB_WORKSPACE/assets/
BUILD_PARAMS=""
if [[ "${GITHUB_REF}" == "refs/heads/master" ]]; then
BUILD_PARAMS="--push --tag appaquet/exocore:latest"
elif "${GITHUB_REF}" == refs/tags/* ]]; then
GIT_TAG="${GITHUB_REF/refs\/tags\//}"
BUILD_PARAMS="--push --tag appaquet/exocore:$GIT_TAG --tag appaquet/exocore:latest"
fi
export DOCKER_CLI_EXPERIMENTAL=enabled
docker buildx build \
--tag appaquet/exocore:$TAG \
--platform linux/amd64,linux/arm \
--file $GITHUB_WORKSPACE/exocore/exo/Dockerfile.buildx \
$BUILD_PARAMS \
.
exomind_docker_build:
runs-on: ubuntu-latest
needs: [exm_build]
steps:
- uses: actions/checkout@v4
- name: Download x86_64 exm
uses: actions/download-artifact@v4
with:
name: exm-x86_64-unknown-linux-gnu
- name: Download arm exm
uses: actions/download-artifact@v4
with:
name: exm-armv7-unknown-linux-gnueabihf
- name: Download release files
run: |
set -x
mkdir assets/
mv exm.x86_64-unknown-linux-gnu assets/exm-amd64
mv exm.armv7-unknown-linux-gnueabihf assets/exm-arm
chmod a+x assets/exm*
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.actor != 'dependabot[bot]' }} # dependabot doesn't have access to secrets
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Setup Docker builder
run: |
set -x
# Allows build in arm for qemu
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# Create builder
export DOCKER_CLI_EXPERIMENTAL=enabled
docker buildx create --use --name exomind-builder
- name: Build & publish Docker
run: |
set -x
TAG="$(git rev-parse --short HEAD)"
cd $GITHUB_WORKSPACE/assets/
BUILD_PARAMS=""
if [[ "${GITHUB_REF}" == "refs/heads/master" ]]; then
BUILD_PARAMS="--push --tag appaquet/exomind:latest"
elif "${GITHUB_REF}" == refs/tags/* ]]; then
GIT_TAG="${GITHUB_REF/refs\/tags\//}"
BUILD_PARAMS="--push --tag appaquet/exomind:$GIT_TAG --tag appaquet/exomind:latest"
fi
export DOCKER_CLI_EXPERIMENTAL=enabled
docker buildx build \
--tag appaquet/exomind:$TAG \
--platform linux/amd64,linux/arm \
--file $GITHUB_WORKSPACE/exomind/exm/Dockerfile.buildx \
$BUILD_PARAMS \
.
exomind_web_docker_build:
runs-on: ubuntu-latest
needs: [exocore_web_client_build]
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.actor != 'dependabot[bot]' }} # dependabot doesn't have access to secrets
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20.x
- name: Download exocore web client
uses: actions/download-artifact@v4
with:
name: exocore-web-client
- name: Unarchive exocore web client
run: |
cd $GITHUB_WORKSPACE
# Striping first directory as yarn package wraps into a `package` directory
tar --strip-components=1 -xvzf exocore-web.tar.gz -C exocore/
- name: Build & test
run: |
cd exomind/web
yarn install --frozen-lockfile
yarn build
env:
NODE_OPTIONS: "--openssl-legacy-provider"
- name: Setup Docker builder
run: |
set -x
# Create builder
export DOCKER_CLI_EXPERIMENTAL=enabled
docker buildx create --use --name exomind-builder
- name: Build & publish Docker
run: |
set -x
TAG="$(git rev-parse --short HEAD)"
BUILD_PARAMS=""
if [[ "${GITHUB_REF}" == "refs/heads/master" ]]; then
BUILD_PARAMS="--push --tag appaquet/exomind-web:latest"
elif "${GITHUB_REF}" == refs/tags/* ]]; then
GIT_TAG="${GITHUB_REF/refs\/tags\//}"
BUILD_PARAMS="--push --tag appaquet/exomind-web:$GIT_TAG --tag appaquet/exomind-web:latest"
fi
cd $GITHUB_WORKSPACE/exomind/web
export DOCKER_CLI_EXPERIMENTAL=enabled
docker buildx build \
--tag appaquet/exomind-web:$TAG \
--platform linux/amd64 \
$BUILD_PARAMS \
.
exocore_apps_sdk_runtime_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: wasm32-wasip1
- uses: Swatinem/rust-cache@v2
- name: Generate sample WASM fixtures
run: |
./exocore/apps/tools/build_fixtures.sh
- name: Tests
run: ./tools/test.sh
exocore_web_client_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- name: Install build dependencies
run: |
sudo apt update
sudo apt install -yq libssl-dev openssl
# curl -L https://github.com/rustwasm/wasm-pack/releases/download/v0.13.1/wasm-pack-v0.13.1-x86_64-unknown-linux-musl.tar.gz | tar zxf -
# mv wasm-pack*/wasm-pack .
# echo `pwd` >> $GITHUB_PATH
cargo install wasm-pack
sudo npm install -g yarn
- name: Build client
run: |
cd $GITHUB_WORKSPACE/exocore
yarn install
yarn build
yarn pack
mv exocore-v*.tgz ../exocore-web.tar.gz
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: exocore-web-client
path: exocore-web.tar.gz
if-no-files-found: error
exocore_web_client_e2e_test:
runs-on: ubuntu-latest
needs: [exocore_web_client_build, exo_build]
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20.x
- name: Download exocore web client
uses: actions/download-artifact@v4
with:
name: exocore-web-client
- name: Download exo
uses: actions/download-artifact@v4
with:
name: exo-x86_64-unknown-linux-gnu
- name: Unarchive exocore web client
run: |
cd $GITHUB_WORKSPACE
# Striping first directory as yarn package wraps into a `package` directory
tar --strip-components=1 -xvzf exocore-web.tar.gz -C exocore/
- name: Add exo to path
run: |
cd $GITHUB_WORKSPACE
ls -lash
mv exo.x86_64-unknown-linux-gnu exo
chmod +x exo
echo `pwd` >> $GITHUB_PATH
- name: Install example project
run: |
cd $GITHUB_WORKSPACE/exocore/examples/web
yarn install --frozen-lockfile
npx playwright install --with-deps chromium
- name: Run end-to-end tests
run: |
cd $GITHUB_WORKSPACE/exocore/examples/web/tests
exo -d node daemon &
sleep 5
cd $GITHUB_WORKSPACE/exocore/examples/web
DEBUG=pw:api yarn exec playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: exocore/examples/web/playwright-report
retention-days: 7
exocore_ios_client_build:
runs-on: macos-14 # See https://github.com/actions/virtual-environments/blob/main/images/macos for versions
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: |
HOMEBREW_NO_INSTALL_CLEANUP=1 brew install swift-protobuf
rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim # actions-rs doesn't support multiple targets: https://github.com/actions-rs/toolchain/issues/16
cargo install cargo-lipo cbindgen --debug # make build faster, no need for speed from it
- name: Build client & pod
run: |
cd $GITHUB_WORKSPACE/exocore/clients/ios
./tools/generate.sh
if [[ "${GITHUB_REF}" == "refs/heads/master" || "${GITHUB_REF}" == refs/tags/* ]]; then
./tools/build.sh release
else
./tools/build.sh
fi
cd $GITHUB_WORKSPACE/exocore/
pod lib lint --verbose --allow-warnings
- name: Archive exocore ios client
run: |
cd $GITHUB_WORKSPACE
mkdir archive
mkdir -p archive/clients/
cp -r exocore/clients/ios archive/clients/
cp exocore/Exocore.podspec archive/
cd archive/
tar -czf $GITHUB_WORKSPACE/exocore-ios.tar.gz *
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: exocore-ios-client
path: exocore-ios.tar.gz
if-no-files-found: error
exocore_ios_example_build:
runs-on: macos-14 # See https://github.com/actions/virtual-environments/blob/main/images/macos for versions
needs: [exocore_ios_client_build]
steps:
- uses: actions/checkout@v4
- name: Download exocore ios client
uses: actions/download-artifact@v4
with:
name: exocore-ios-client
- name: Unarchive exocore ios client
run: |
cd $GITHUB_WORKSPACE
tar -xzvf exocore-ios.tar.gz -C exocore/
- name: Build example project
run: |
cd $GITHUB_WORKSPACE/exocore/examples/ios
pod install
xcodebuild -workspace ExamplesIos.xcworkspace -scheme ExamplesIos -destination "generic/platform=iOS" CODE_SIGNING_ALLOWED=NO
exomind_ios_build:
runs-on: macos-14
needs: [exocore_ios_client_build, exocore_web_client_build]
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20.x
- name: Download exocore ios client
uses: actions/download-artifact@v4
with:
name: exocore-ios-client
- name: Unarchive exocore ios client
run: |
cd $GITHUB_WORKSPACE
tar -xzvf exocore-ios.tar.gz -C exocore/
- name: Download exocore web client
uses: actions/download-artifact@v4
with:
name: exocore-web-client
- name: Unarchive exocore web client
run: |
cd $GITHUB_WORKSPACE
# Striping first directory as yarn package wraps into a `package` directory
tar --strip-components=1 -xvzf exocore-web.tar.gz -C exocore/
- name: Build web dependency
run: |
cd $GITHUB_WORKSPACE/exomind/web
yarn install --frozen-lockfile
yarn build_ios
env:
NODE_OPTIONS: "--openssl-legacy-provider"
- uses: actions/cache@v4
with:
path: exomind/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Build
run: |
cd $GITHUB_WORKSPACE/exomind/ios
pod install
xcodebuild -workspace Exomind.xcworkspace -scheme Exomind -destination "generic/platform=iOS" CODE_SIGNING_ALLOWED=NO
exomind_web_build:
runs-on: ubuntu-latest
needs: [exocore_web_client_build]
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20.x
- name: Download exocore web client
uses: actions/download-artifact@v4
with:
name: exocore-web-client
- name: Unarchive exocore web client
run: |
cd $GITHUB_WORKSPACE
# Striping first directory as yarn package wraps into a `package` directory
tar --strip-components=1 -xvzf exocore-web.tar.gz -C exocore/
- name: Build & test
run: |
cd exomind/web
yarn install --frozen-lockfile
yarn build
yarn test
yarn lint
env:
NODE_OPTIONS: "--openssl-legacy-provider"
exomind_electron_app:
runs-on: ${{ matrix.os }}
needs: [exocore_web_client_build]
strategy:
fail-fast: false
matrix:
os: [macos-14, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20.x
- name: Download exocore web client
uses: actions/download-artifact@v4
with:
name: exocore-web-client
- name: Unarchive exocore web client
run: |
cd $GITHUB_WORKSPACE
# Striping first directory as yarn package wraps into a `package` directory
tar --strip-components=1 -xvzf exocore-web.tar.gz -C exocore/
- name: Build
run: |
cd exomind/web
yarn install
yarn electron_dist
mkdir pkg
if [ "${{ matrix.os }}" == "macos-14" ]; then
mv dist/Exomind-*-arm64.dmg pkg/exomind-electron-macos-aarch64.dmg
mv dist/Exomind-*.dmg pkg/exomind-electron-macos-x86_64.dmg
elif [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
cp dist/exomind-*_amd64.snap pkg/exomind-electron-linux.snap
elif [ "${{ matrix.os }}" == "windows-latest" ]; then
cp dist/Exomind*.exe pkg/exomind-electron-win.exe
else
echo "${{ matrix.os }} not supported"
exit 1
fi
env:
NODE_OPTIONS: "--openssl-legacy-provider"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: exomind-electron-${{ matrix.os }}
path: exomind/web/pkg/*
if-no-files-found: error
exomind_app_package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: wasm32-wasip1
- uses: Swatinem/rust-cache@v2
- name: Download exo
run: |
wget https://github.com/appaquet/exocore/releases/download/v0.1.25/exo.x86_64-unknown-linux-gnu.tar.gz -O - | tar -zx
echo `pwd` >> $GITHUB_PATH
- name: Build & package app
run: |
cd $GITHUB_WORKSPACE/exomind/
./app/tools/build.sh
mv exomind.zip exomind-app.zip
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: exomind-app-package
path: exomind/exomind-app.zip
if-no-files-found: error
markdown_links_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gaurav-nelson/[email protected]