Skip to content
Open
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
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[build]
target-dir = "target"

# Cross-compilation support for armv7
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
Expand Down
6 changes: 3 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ docs/_build/
node_modules/

# Development scripts
dev_scripts/
dev-scripts/
dev-docs/

# Tauri development files
src-tauri/target/

# GUI development files
# GUI development files
src-gui/node_modules/
src-gui/dist/
src-gui/.next/
Expand All @@ -38,4 +38,4 @@ src-gui/.next/
*.temp

# OS files
Thumbs.db
Thumbs.db
5 changes: 3 additions & 2 deletions .github/actions/set-monero-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ runs:
run: |

# GUI-specific Ubuntu dependencies
echo "DEPS_GUI_UBUNTU_SPECIFIC=libgtk-3-dev libappindicator3-dev librsvg2-dev libwebkit2gtk-4.1-0 libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-0 libjavascriptcoregtk-4.1-dev gir1.2-javascriptcoregtk-4.1 gir1.2-webkit2-4.1" >> $GITHUB_ENV
grep -q noble /etc/os-release && pin==2.44.0-2 || pin=
echo "DEPS_GUI_UBUNTU_SPECIFIC=flatpak-builder jq libgtk-3-dev libappindicator3-dev librsvg2-dev" {libwebkit2gtk-4.1-0,libwebkit2gtk-4.1-dev,libjavascriptcoregtk-4.1-0,libjavascriptcoregtk-4.1-dev,gir1.2-javascriptcoregtk-4.1,gir1.2-webkit2-4.1}"$pin" >> $GITHUB_ENV

# Build tooling (Linux)
echo "DEPS_BUILD_LINUX=autoconf nsis mingw-w64 build-essential pkg-config libtool ccache make cmake gcc g++ git curl lbzip2 gperf g++-mingw-w64-x86-64" >> $GITHUB_ENV
Expand All @@ -28,4 +29,4 @@ runs:
- name: Crabnebula identifier
shell: bash
run: |
echo "CN_APPLICATION=unstoppableswap/unstoppableswap-gui-rs" >> $GITHUB_ENV
echo "CN_APPLICATION=unstoppableswap/unstoppableswap-gui-rs" >> $GITHUB_ENV
2 changes: 1 addition & 1 deletion .github/actions/setup-build-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ runs:
npm install --global yarn@1

- name: Install Rust stable
uses: dtolnay/rust-toolchain@1.87
uses: dtolnay/rust-toolchain@1.88
with:
targets: ${{ inputs.target }}

Expand Down
87 changes: 81 additions & 6 deletions .github/workflows/build-gui-release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ jobs:
exit 1
fi

export GNUPGHOME="$(mktemp -d)"
chmod 700 "$GNUPGHOME"
export GNUPGHOME="$(umask 077; mktemp -d)"

# Allow loopback pinentry when passphrase is provided
echo "allow-loopback-pinentry" >> "$GNUPGHOME/gpg-agent.conf"
Expand Down Expand Up @@ -152,22 +151,98 @@ jobs:
# Find all .asc signature files we just created
find target/${{ matrix.target }}/release/bundle -type f -name "*.asc" -print0 | while IFS= read -r -d '' sig_file; do
echo "Uploading signature: $sig_file"
# Get just the filename for the asset name
asset_name=$(basename "$sig_file")

gh release upload "${{ github.event.release.tag_name }}" \
"$sig_file" \
--clobber
done

- name: upload to crabnebula release (not for previews)
- name: Upload flatpak release
if: ${{ github.event_name != 'pull_request' && !contains(github.ref_name, 'preview') && matrix.target == 'x86_64-unknown-linux-gnu' }}
shell: bash
run: |
set -euxo pipefail

deb=$(find "$PWD" -name *.deb -print -quit)
jq --arg deb_path "$deb" --arg PWD "$PWD" '
.modules[0].sources[0] = {
"type": "file",
"path": $deb_path
} |
.modules[0].sources[1].path = $PWD + "/" + .modules[0].sources[1].path
' < flatpak/org.eigenwallet.app.json > target/manifest.json

outdir=target/flatpak-repo
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak-builder build-dir --gpg-sign="$GPG_FPR" --user --install-deps-from=flathub --disable-rofiles-fuse --disable-updates --repo="$outdir" target/manifest.json
flatpak build-update-repo --gpg-sign="$GPG_FPR" --generate-static-deltas --prune "$outdir"
flatpak build-bundle --gpg-sign="$GPG_FPR" "$outdir" "$outdir/org.eigenwallet.app.flatpak" org.eigenwallet.app stable

ln flatpak/index.html flatpak/*.flatpakre* src-tauri/icons/icon.png README.md "$outdir/"
> "$outdir/.nojekyll"

IFS=/ read -r user repo <<< "$GITHUB_REPOSITORY"
sed -e "s|%Url%|https://$user.github.io/$repo|" \
-e "s|%Homepage%|https://github.com/$GITHUB_REPOSITORY|" \
-e "s|%GPGKey%|$(gpg --export "$GPG_FPR" | base64 -w0)|" \
-i "$outdir"/*.flatpakre*

git -C "$outdir" init
git -C "$outdir" add .
git -C "$outdir" config user.name "${{ secrets.BOTTY_NAME }}"
git -C "$outdir" config user.email ${{ secrets.BOTTY_EMAIL }}
git -C "$outdir" commit -m "Build Flatpak repository from $GITHUB_REF_NAME ($GITHUB_SHA)"
git fetch -f "$outdir" HEAD:gh-pages
git push -f origin gh-pages

- name: Upload to crabnebula release (not for previews)
if: ${{ github.event_name != 'pull_request' && !contains(github.ref_name, 'preview') }}
uses: crabnebula-dev/cloud-release@v0
with:
command: release upload ${{ env.CN_APPLICATION }} --framework tauri
api-key: ${{ secrets.CN_API_KEY }}
args: --target ${{ matrix.target }}

generate-homebrew-formula:
needs: [build_gui]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Download DMG files and generate formula
env:
GITHUB_TOKEN: ${{ secrets.BOTTY_GITHUB_TOKEN }}
run: |
set -euo pipefail

VERSION="${{ github.event.release.tag_name }}"

# Download the DMG files
gh release download "$VERSION" --pattern "*.dmg" --dir /tmp/dmgs

# Calculate SHA256 checksums
AARCH64_DMG=/tmp/dmgs/*_aarch64_darwin.dmg
X64_DMG=/tmp/dmgs/*_x64_darwin.dmg

AARCH64_SHA256=$(sha256sum "$AARCH64_DMG" | awk '{print $1}')
X64_SHA256=$(sha256sum "$X64_DMG" | awk '{print $1}')

echo "aarch64 SHA256: $AARCH64_SHA256"
echo "x64 SHA256: $X64_SHA256"

# Generate the Homebrew formula from template
sed -e "s/VERSION_PLACEHOLDER/$VERSION/g" \
-e "s/AARCH64_SHA256_PLACEHOLDER/$AARCH64_SHA256/g" \
-e "s/X64_SHA256_PLACEHOLDER/$X64_SHA256/g" \
dev-scripts/homebrew/eigenwallet.rb.template | tee eigenwallet.rb

- name: Upload Homebrew formula to release
env:
GITHUB_TOKEN: ${{ secrets.BOTTY_GITHUB_TOKEN }}
run: |
gh release upload "${{ github.event.release.tag_name }}" \
eigenwallet.rb \
--clobber

publish:
# don't publish previews to crabnebula
if: ${{ github.event_name != 'pull_request' && !contains(github.ref_name, 'preview') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-release-binaries.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Build swap, asb, asb-controller, orchestrator and rendezvous-server release binaries"
name: "Build swap, asb, asb-controller, orchestrator and rendezvous-node release binaries"

on:
pull_request:
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- name: asb-controller
smoke_test_args: ""
smoke_test_fake_interactive: false
- name: rendezvous-server
- name: rendezvous-node
smoke_test_args: "--help"
smoke_test_fake_interactive: false
- name: orchestrator
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
target_os = triple[2].lower()

os_mapping = {"linux": "Linux", "windows": "Windows", "darwin": "Darwin"}

if target_os not in os_mapping:
raise ValueError(f"Unknown target OS: {target_os}")

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ jobs:
test_name: happy_path
- package: swap
test_name: happy_path_alice_developer_tip
- package: swap
test_name: happy_path_alice_developer_tip_subaddress
- package: swap
test_name: happy_path_restart_bob_after_xmr_locked
- package: swap
Expand Down Expand Up @@ -147,6 +149,12 @@ jobs:
test_name: alice_empty_balance_after_started_btc_early_refund
- package: swap
test_name: alice_broken_wallet_rpc_after_started_btc_early_refund
- package: swap-orchestrator
test_name: orchestrator_produces_expected_compose_config
- package: monero-tests
test_name: transfers
- package: monero-tests
test_name: transfers_wrong_key

runs-on: ubuntu-22.04
if: github.event_name == 'push' || !github.event.pull_request.draft
Expand Down
25 changes: 21 additions & 4 deletions .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,53 @@ jobs:
git config user.name "${{ secrets.BOTTY_NAME }}"
git config user.email ${{ secrets.BOTTY_EMAIL }}

- name: Bump version in Cargo.toml
- name: Bump version in swap/Cargo.toml
uses: thomaseizinger/set-crate-version@1.0.0
with:
version: ${{ github.event.inputs.version }}
manifest: swap/Cargo.toml

- name: Bump version in Cargo.toml for GUI
- name: Bump version in src-tauri/Cargo.toml
uses: thomaseizinger/set-crate-version@1.0.0
with:
version: ${{ github.event.inputs.version }}
manifest: src-tauri/Cargo.toml

- name: Bump version in swap-asb/Cargo.toml
uses: thomaseizinger/set-crate-version@1.0.0
with:
version: ${{ github.event.inputs.version }}
manifest: swap-asb/Cargo.toml

- name: Bump version in swap-controller/Cargo.toml
uses: thomaseizinger/set-crate-version@1.0.0
with:
version: ${{ github.event.inputs.version }}
manifest: swap-controller/Cargo.toml

- name: Update version in tauri.conf.json for GUI
run: |
sed -i 's/"version": "[^"]*"/"version": "${{ github.event.inputs.version }}"/' src-tauri/tauri.conf.json

- name: Update version in flatpak AppStream metadata for GUI
run: |
sed -i '/<releases>/a\
<release version="${{ github.event.inputs.version }}" date="'"$(date -I)"'" />' flatpak/*.appdata.xml

- name: Update Cargo.lock
run: cargo update --workspace

- name: Commit changelog and manifest files
id: make-commit
env:
DPRINT_VERSION: "0.50.0"
RUST_TOOLCHAIN: "1.87.0"
RUST_TOOLCHAIN: "1.88.0"
run: |
rustup component add rustfmt --toolchain "$RUST_TOOLCHAIN-x86_64-unknown-linux-gnu"
curl -fsSL https://dprint.dev/install.sh | sh -s $DPRINT_VERSION
/home/runner/.dprint/bin/dprint fmt

git add CHANGELOG.md Cargo.lock swap/Cargo.toml src-tauri/Cargo.toml src-tauri/tauri.conf.json
git add CHANGELOG.md Cargo.lock swap/Cargo.toml src-tauri/Cargo.toml swap-asb/Cargo.toml swap-controller/Cargo.toml src-tauri/tauri.conf.json
git commit --message "Prepare release ${{ github.event.inputs.version }}"

echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
target/
target-check/
analyzer-target/

.vscode
.claude/settings.local.json
Expand All @@ -19,4 +20,5 @@ swap-orchestrator/config.toml

# release build generator scripts
release-build.sh
cn_macos
cn_macos
libp2p-rendezvous-node/rendezvous-data
2 changes: 2 additions & 0 deletions .helix/ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src-tauri/gen/

16 changes: 12 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,17 @@
"shared_mutex": "cpp",
"source_location": "cpp",
"strstream": "cpp",
"typeindex": "cpp"
"typeindex": "cpp",
"valarray": "cpp",
"*.ipp": "cpp"
},
"rust-analyzer.cargo.extraEnv": {
"CARGO_TARGET_DIR": "target-check"
}
}
"CARGO_TARGET_DIR": "analyzer-target"
},
"[cpp]": {
"editor.formatOnSave": false
},
"[c]": {
"editor.formatOnSave": false
},
}
Loading