Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build for xdbg #1412

Closed
wants to merge 6 commits into from
Closed
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
1 change: 1 addition & 0 deletions .cargo/nextest.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[profile.default]
retries = 3
default-filter = "not test(test_stream_all_messages_does_not_lose_messages)"
50 changes: 50 additions & 0 deletions .github/workflows/release-xdbg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and Push xmtp-debug to ghcr
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [aarch64-darwin, x86_64-linux, aarch64-linux, x86_64-darwin]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v14
with:
name: xmtp
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build xdbgDocker
run: |
nix build .#packages.${{ matrix.platform }}.xdbgDocker
- name: Build xdbg Binary
run: |
nix build .#packages.${{ matrix.platform }}.xdbg
nix path-info .#packages.${{ matrix.platform }}.xdbg | xargs -I {} cp {}/bin/xdbg ./xdbg-${{ matrix.platform }}
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Tag Docker image
run: |
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:xdbg-${{ matrix.platform }}
nix path-info .#packages.${{ matrix.platform }}.xdbgDocker | xargs -I {} docker load < {}/docker-image.tar.gz
docker tag $(docker images --filter "label=org.opencontainers.image.title=xdbg" -q):latest $IMAGE_NAME
- name: Push Docker image to GHCR
run: |
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:xdbg-${{ matrix.platform }}
docker push $IMAGE_NAME
- name: Upload xdbg binary to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./xdbg-${{ matrix.platform }}
asset_name: xdbg-${{ matrix.platform }}
asset_content_type: application/octet-stream
4 changes: 2 additions & 2 deletions .github/workflows/test-http-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ jobs:
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: build tests
run: cargo nextest run --no-run --tests --workspace --exclude xmtp_api_grpc --exclude xmtpv3 --exclude bindings_node --exclude bindings_wasm --features http-api
run: cargo nextest run --config-file ".cargo/nextest.toml" --no-run --tests --workspace --exclude xmtp_api_grpc --exclude xmtpv3 --exclude bindings_node --exclude bindings_wasm --features http-api
- name: cargo test
run: cargo nextest run --workspace --exclude xmtp_api_grpc --exclude xmtpv3 --exclude bindings_node --exclude bindings_wasm --features http-api --test-threads 2
run: cargo nextest run --config-file ".cargo/nextest.toml" --workspace --exclude xmtp_api_grpc --exclude xmtpv3 --exclude bindings_node --exclude bindings_wasm --features http-api --test-threads 2
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,5 @@ ecies_bindings_wasm/
**/tracing-flamegraph.svg

chain_urls.json
result/**
result
2 changes: 1 addition & 1 deletion dev/release-kotlin
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi
LIBRARY_NAME="libxmtpv3"
TARGET_NAME="libuniffi_xmtpv3"

nix develop . --command cargo ndk -o bindings_ffi/jniLibs/ --manifest-path ./bindings_ffi/Cargo.toml \
nix develop .#android --command cargo ndk -o bindings_ffi/jniLibs/ --manifest-path ./bindings_ffi/Cargo.toml \
-t aarch64-linux-android \
-t x86_64-linux-android \
-t i686-linux-android \
Expand Down
71 changes: 50 additions & 21 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading