aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/release.yml42
-rw-r--r--Cargo.lock11
-rw-r--r--Cargo.toml3
-rwxr-xr-xutils/create-signed-manifest.sh1
4 files changed, 40 insertions, 17 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 4a3d484..5dc5533 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -9,40 +9,48 @@ jobs:
release:
strategy:
matrix:
- os: [ubuntu-latest, macos-latest, windows-latest]
- include:
+ platform:
- os: ubuntu-latest
+ target: x86_64-unknown-linux-gnu
bin: sentrum
name: sentrum-${{ github.ref_name }}-linux-x86_64
+ - os: ubuntu-latest
+ target: aarch64-unknown-linux-gnu
+ bin: sentrum
+ name: sentrum-${{ github.ref_name }}-linux-aarch64
- os: windows-latest
+ target: x86_64-pc-windows-msvc
bin: sentrum.exe
name: sentrum-${{ github.ref_name }}-windows-x86_64
- os: macos-latest
+ target: x86_64-apple-darwin
bin: sentrum
name: sentrum-${{ github.ref_name }}-darwin-x86_64
- runs-on: ${{ matrix.os }}
+ runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v4
- - uses: dtolnay/rust-toolchain@master
- with:
- toolchain: stable
- uses: Swatinem/rust-cache@v2
- - run: cargo build --locked --release
+ - name: Build binary
+ uses: houseabsolute/actions-rust-cross@v0
+ with:
+ target: ${{ matrix.platform.target }}
+ args: "--locked --release"
+ strip: true
- name: Package
shell: bash
run: |
- strip target/release/${{ matrix.bin }}
- mkdir ${{ matrix.name }}
- cp target/release/${{ matrix.bin }} ${{ matrix.name }}
- cp sentrum.sample.toml ${{ matrix.name }}
- cp -r contrib ${{ matrix.name }}
- cp -r man ${{ matrix.name }}
- cp LICENSE.txt ${{ matrix.name }}
- if [[ "${{ matrix.os }}" == "windows-latest" ]]
+ mkdir ${{ matrix.platform.name }}
+ cp target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }} ${{ matrix.platform.name }}
+ cp sentrum.sample.toml ${{ matrix.platform.name }}
+ cp -r contrib ${{ matrix.platform.name }}
+ cp -r man ${{ matrix.platform.name }}
+ cp LICENSE.txt ${{ matrix.platform.name }}
+ cp README.md ${{ matrix.platform.name }}
+ if [[ "${{ matrix.platform.os }}" == "windows-latest" ]]
then
- 7z a ${{ matrix.name }}.zip ${{ matrix.name }}
+ 7z a ${{ matrix.platform.name }}.zip ${{ matrix.platform.name }}
else
- tar czvf ${{ matrix.name }}.tar.gz ${{ matrix.name }}
+ tar czvf ${{ matrix.platform.name }}.tar.gz ${{ matrix.platform.name }}
fi
- name: Generate Changelog
run: utils/generate_changelog.sh > ${{ github.workspace }}-CHANGELOG.md
diff --git a/Cargo.lock b/Cargo.lock
index 922c411..39ac7b2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2170,6 +2170,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
+name = "openssl-src"
+version = "300.2.3+3.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843"
+dependencies = [
+ "cc",
+]
+
+[[package]]
name = "openssl-sys"
version = "0.9.102"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2177,6 +2186,7 @@ checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2"
dependencies = [
"cc",
"libc",
+ "openssl-src",
"pkg-config",
"vcpkg",
]
@@ -2890,6 +2900,7 @@ dependencies = [
"nostr-sdk",
"notify-rust",
"ntfy",
+ "openssl",
"pretty_env_logger",
"serde",
"strfmt",
diff --git a/Cargo.toml b/Cargo.toml
index ef943c2..6ca1e2e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -41,3 +41,6 @@ async-trait = "0.1.80"
teloxide = { version = "0.12.2", optional = true }
nostr-sdk = { version = "0.30.0", features = ["nip04", "nip05", "nip44", "nip59"], default-features = false, optional = true }
nostr-relay-pool = { version = "0.30.0", optional = true }
+
+[target.aarch64-unknown-linux-gnu.dependencies]
+openssl = { version = "*", features = ["vendored"] }
diff --git a/utils/create-signed-manifest.sh b/utils/create-signed-manifest.sh
index fa0acd2..a711c85 100755
--- a/utils/create-signed-manifest.sh
+++ b/utils/create-signed-manifest.sh
@@ -11,6 +11,7 @@ cd "$(mktemp -d)"
wget "https://github.com/sommerfelddev/sentrum/releases/download/$tag/sentrum-$tag-darwin-x86_64.tar.gz"
wget "https://github.com/sommerfelddev/sentrum/releases/download/$tag/sentrum-$tag-linux-x86_64.tar.gz"
+wget "https://github.com/sommerfelddev/sentrum/releases/download/$tag/sentrum-$tag-linux-aarch64.tar.gz"
wget "https://github.com/sommerfelddev/sentrum/releases/download/$tag/sentrum-$tag-windows-x86_64.zip"
sha256sum -b -- * > sentrum-"$tag"-manifest.txt