Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[registry]
global-credential-providers = ["cargo:token"]

[registries.cargo-hosted]
index = "sparse+http://nexus.volla.tech/repository/cargo-hosted/"
44 changes: 20 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
# which is required to build the apps.
environment: Android Service Runtime Release

runs-on: ubuntu-latest
runs-on: self-hosted
container:
image: ubuntu:24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -31,35 +33,31 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
android: false
swap-storage: false

- name: Enable KVM
- name: Install packages
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
apt-get update
apt-get install -y sudo build-essential curl openjdk-11-jdk unzip git

- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05
enable_kvm: false

- uses: cachix/cachix-action@v15
env:
USER: root
with:
name: holochain-ci

- name: setup Android signing
run: |
cd apps/${{ matrix.build.name }}/src-tauri/gen/android
base64 -d <<< "${{ secrets.ANDROID_KEY_BASE64 }}" > $RUNNER_TEMP/keystore.jks
printf '%s' "${{ secrets.ANDROID_KEY_BASE64 }}" | base64 -d > keystore.jks
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" > key.properties
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> key.properties
echo "storeFile=$RUNNER_TEMP/keystore.jks" >> key.properties
echo "storeFile=../keystore.jks" >> key.properties
echo "storePassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> key.properties

- name: Build app ${{ matrix.build.name }} ${{ matrix.build.features }}
Expand All @@ -68,7 +66,9 @@ jobs:

build-tauri-plugins:
name: Build tauri plugins
runs-on: ubuntu-latest
runs-on: self-hosted
container:
image: ubuntu:24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -79,25 +79,21 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
android: false
swap-storage: false

- name: Enable KVM
- name: Install packages
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
apt-get update
apt-get install -y sudo build-essential curl openjdk-11-jdk unzip git

- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05
enable_kvm: false

- uses: cachix/cachix-action@v15
env:
USER: root
with:
name: holochain-ci

Expand Down
50 changes: 27 additions & 23 deletions .github/workflows/release-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ jobs:
create-release:
permissions: write-all
environment: Android Service Runtime Release
runs-on: ubuntu-latest
runs-on: self-hosted
container:
image: ubuntu:24.04
outputs:
releaseId: ${{ steps.step1.outputs.id }}
steps:
Expand Down Expand Up @@ -52,7 +54,9 @@ jobs:
environment: Android Service Runtime Release
needs:
- create-release
runs-on: 'ubuntu-22.04'
runs-on: self-hosted
container:
image: ubuntu:24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -64,18 +68,21 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
android: false
- name: Install packages
run: |
apt-get update
apt-get install -y sudo build-essential curl openjdk-11-jdk unzip git

- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05
enable_kvm: false

- uses: cachix/cachix-action@v15
env:
USER: root
with:
name: holochain-ci

Expand All @@ -86,30 +93,26 @@ jobs:
- name: setup Android signing
run: |
cd apps/android-service-runtime/src-tauri/gen/android
base64 -d <<< "${{ secrets.ANDROID_KEY_BASE64 }}" > $RUNNER_TEMP/keystore.jks
printf '%s' "${{ secrets.ANDROID_KEY_BASE64 }}" | base64 -d > keystore.jks
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" > key.properties
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> key.properties
echo "storeFile=$RUNNER_TEMP/keystore.jks" >> key.properties
echo "storeFile=../keystore.jks" >> key.properties
echo "storePassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> key.properties

- name: Build android AAB
run: |
cargo clean
nix develop --no-update-lock-file --command bash -c "pnpm run build:android-service-runtime --aab --target aarch64 --target i686 --target x86_64 --features ${{ matrix.feature }}"

- name: Build android APK (aarch64)
run: |
cargo clean
nix develop --no-update-lock-file --command bash -c "pnpm run build:android-service-runtime --apk --split-per-abi --target aarch64 --features ${{ matrix.feature }}"

- name: Build android APK (i686)
run: |
cargo clean
nix develop --no-update-lock-file --command bash -c "pnpm run build:android-service-runtime --apk --split-per-abi --target i686 --features ${{ matrix.feature }}"

- name: Build android APK (x86_64)
run: |
cargo clean
nix develop --no-update-lock-file --command bash -c "pnpm run build:android-service-runtime --apk --split-per-abi --target x86_64 --features ${{ matrix.feature }}"

- name: Rename android APKs and ABBs
Expand All @@ -131,24 +134,29 @@ jobs:
environment: Android Service Runtime Release
needs:
- create-release
runs-on: 'ubuntu-22.04'
runs-on: self-hosted
container:
image: ubuntu:24.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3

- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
android: false
- name: Install packages
run: |
apt-get update
apt-get install -y sudo build-essential curl openjdk-11-jdk unzip git

- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05
enable_kvm: false

- uses: cachix/cachix-action@v15
env:
USER: root
with:
name: holochain-ci

Expand All @@ -162,30 +170,26 @@ jobs:
- name: setup Android signing
run: |
cd apps/example-client-app/src-tauri/gen/android
base64 -d <<< "${{ secrets.ANDROID_KEY_BASE64 }}" > $RUNNER_TEMP/keystore.jks
printf '%s' "${{ secrets.ANDROID_KEY_BASE64 }}" | base64 -d > keystore.jks
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" > key.properties
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> key.properties
echo "storeFile=$RUNNER_TEMP/keystore.jks" >> key.properties
echo "storeFile=../keystore.jks" >> key.properties
echo "storePassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> key.properties

- name: Build android AAB
run: |
cargo clean
nix develop --no-update-lock-file --command bash -c "pnpm run build:example-client-app --aab --target aarch64 --target i686 --target x86_64 --features ${{ matrix.feature }}"

- name: Build android APK (aarch64)
run: |
cargo clean
nix develop --no-update-lock-file --command bash -c "pnpm run build:example-client-app --apk --split-per-abi --target aarch64 --features ${{ matrix.feature }}"

- name: Build android APK (i686)
run: |
cargo clean
nix develop --no-update-lock-file --command bash -c "pnpm run build:example-client-app --apk --split-per-abi --target i686 --features ${{ matrix.feature }}"

- name: Build android APK (x86_64)
run: |
cargo clean
nix develop --no-update-lock-file --command bash -c "pnpm run build:example-client-app --apk --split-per-abi --target x86_64 --features ${{ matrix.feature }}"

- name: Rename android APKs and ABBs
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/release-crate-runtime-types-ffi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,34 @@ jobs:
release:
permissions: write-all
environment: Cargo Release
runs-on: 'ubuntu-22.04'
runs-on: self-hosted
container:
image: ubuntu:22.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3

- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
android: false
- name: Install packages
run: |
apt-get update
apt-get install -y sudo build-essential curl openjdk-11-jdk unzip git

- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05
enable_kvm: false

- uses: cachix/cachix-action@v15
env:
USER: root
with:
name: holochain-ci

- name: Publish to crates.io
- name: Publish to Nexus Cargo
run: |
nix develop --no-update-lock-file --command bash -c "pnpm run publish:runtime-types-ffi"
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
CARGO_REGISTRIES_CARGO_HOSTED_TOKEN: ${{ secrets.NEXUS_CARGO_TOKEN }}
19 changes: 12 additions & 7 deletions .github/workflows/release-crate-tauri-plugin-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,38 @@ jobs:
release:
permissions: write-all
environment: Cargo Release
runs-on: 'ubuntu-22.04'
runs-on: self-hosted
container:
image: ubuntu:22.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3

- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
android: false
- name: Install packages
run: |
apt-get update
apt-get install -y sudo build-essential curl openjdk-11-jdk unzip git

- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05
enable_kvm: false

- uses: cachix/cachix-action@v15
env:
USER: root
with:
name: holochain-ci

# The `--no-verify` flag is used in `cargo publish` as a workaround because the tauri plugin builder
# writes files outside the OUT_DIR.
#
# See https://github.com/tauri-apps/tauri/issues/11187
- name: Publish to crates.io
- name: Publish to Nexus Cargo
run: |
nix develop --no-update-lock-file --command bash -c "pnpm run publish:tauri-plugin-client"
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
CARGO_REGISTRIES_CARGO_HOSTED_TOKEN: ${{ secrets.NEXUS_CARGO_TOKEN }}
19 changes: 12 additions & 7 deletions .github/workflows/release-crate-tauri-plugin-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,38 @@ jobs:
release:
permissions: write-all
environment: Cargo Release
runs-on: 'ubuntu-22.04'
runs-on: self-hosted
container:
image: ubuntu:22.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3

- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
android: false
- name: Install packages
run: |
apt-get update
apt-get install -y sudo build-essential curl openjdk-11-jdk unzip git

- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05
enable_kvm: false

- uses: cachix/cachix-action@v15
env:
USER: root
with:
name: holochain-ci

# The `--no-verify` flag is used in `cargo publish` as a workaround because the tauri plugin builder
# writes files outside the OUT_DIR.
#
# See https://github.com/tauri-apps/tauri/issues/11187
- name: Publish to crates.io
- name: Publish to Nexus Cargo
run: |
nix develop --no-update-lock-file --command bash -c "pnpm run publish:tauri-plugin-service"
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
CARGO_REGISTRIES_CARGO_HOSTED_TOKEN: ${{ secrets.NEXUS_CARGO_TOKEN }}
Loading
Loading