Skip to content

Commit de887b2

Browse files
committed
fix: lint and have ci only build linux
1 parent 0ab7c8c commit de887b2

3 files changed

Lines changed: 14 additions & 25 deletions

File tree

.github/workflows/build-speculos.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,7 @@ permissions:
1616

1717
jobs:
1818
build:
19-
strategy:
20-
fail-fast: false
21-
matrix:
22-
include:
23-
- arch: amd64
24-
runner: ubuntu-latest
25-
file_arch: x86-64
26-
- arch: arm64
27-
# PyInstaller bundles the host arch; arm64 must build on arm64.
28-
runner: macos-12.0
29-
file_arch: 'ARM aarch64'
30-
31-
runs-on: ${{ matrix.runner }}
19+
runs-on: ubuntu-latest
3220

3321
steps:
3422
- uses: actions/checkout@v4
@@ -61,19 +49,20 @@ jobs:
6149
- name: Verify binary architecture
6250
run: |
6351
file dist/speculos | tee /tmp/speculos-file.txt
64-
grep -Fq '${{ matrix.file_arch }}' /tmp/speculos-file.txt
52+
grep -Fq 'ELF' /tmp/speculos-file.txt
53+
grep -Fq 'x86-64' /tmp/speculos-file.txt
6554
6655
- name: Package archive
6756
run: |
6857
VERSION="${{ github.event.inputs.version || '0.25.13' }}"
6958
cd dist
70-
tar -czf speculos-v${VERSION}-linux-${{ matrix.arch }}.tar.gz speculos
59+
tar -czf speculos-v${VERSION}-linux-amd64.tar.gz speculos
7160
7261
- name: Upload build artifact
7362
uses: actions/upload-artifact@v4
7463
with:
75-
name: speculos-linux-${{ matrix.arch }}
76-
path: dist/speculos-v*-linux-${{ matrix.arch }}.tar.gz
64+
name: speculos-linux-amd64
65+
path: dist/speculos-v*-linux-amd64.tar.gz
7766
if-no-files-found: error
7867

7968
release:

eslint-suppressions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,4 +254,4 @@
254254
"count": 2
255255
}
256256
}
257-
}
257+
}

packages/speculos-up/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ Removes all cached installations.
8080

8181
### `SpeculosupOptions`
8282

83-
| Option | Type | Default | Description |
84-
| ---------- | -------------- | ------------------------------ | ---------------------------------- |
85-
| `version` | string | `'0.25.13'` | Speculos version to install. |
86-
| `repo` | string | `'MetaMask/accounts'` | GitHub repo hosting releases. |
83+
| Option | Type | Default | Description |
84+
| ---------- | -------------- | ------------------------------- | ---------------------------------- |
85+
| `version` | string | `'0.25.13'` | Speculos version to install. |
86+
| `repo` | string | `'MetaMask/accounts'` | GitHub repo hosting releases. |
8787
| `cacheDir` | string | `~/.cache/metamask/speculos-up` | Custom cache directory. |
88-
| `platform` | `Platform` | `Platform.Linux` | Target platform. |
89-
| `arch` | `Architecture` | Auto-detected | Target architecture (amd64/arm64). |
88+
| `platform` | `Platform` | `Platform.Linux` | Target platform. |
89+
| `arch` | `Architecture` | Auto-detected | Target architecture (amd64/arm64). |
9090

9191
## How It Works
9292

@@ -103,7 +103,7 @@ Removes all cached installations.
103103

104104
## Building release binaries (maintainers)
105105

106-
Release archives are **Linux ELF** binaries (`speculos-v<version>-linux-<arch>.tar.gz`). CI builds them on native Linux runners (see `.github/workflows/build-speculos.yml`).
106+
Release archives are **Linux ELF** binaries (`speculos-v<version>-linux-<arch>.tar.gz`). CI builds **linux-amd64** only (see `.github/workflows/build-speculos.yml`); build **linux-arm64** locally with the Docker script below.
107107

108108
On **macOS** (including Apple Silicon) or Windows, use Docker so PyInstaller runs inside Linux:
109109

0 commit comments

Comments
 (0)