From 4e3b0b84e2bcf4c2b78ebb50cbb050b944bf761b Mon Sep 17 00:00:00 2001 From: parabit Date: Fri, 6 Feb 2026 16:42:44 -0600 Subject: [PATCH 1/3] add ci using just and hermit --- .github/workflows/ci.yaml | 52 ++++++++++++++++++++++++ .github/workflows/release.yaml | 74 ++++++++++++++++++++++++++++++++++ bin/package | 44 ++++++++++++++++++++ 3 files changed, 170 insertions(+) create mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/release.yaml create mode 100755 bin/package diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..a25dc4b --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,52 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +defaults: + run: + shell: bash + +env: + RUSTFLAGS: --deny warnings + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + + - uses: Swatinem/rust-cache@v2 + + - name: Clippy + run: cargo clippy --all --all-targets + + - name: Format + run: cargo fmt --all -- --check + + test: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + + - uses: Swatinem/rust-cache@v2 + + - name: Test + run: cargo test --all \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..a0cafb2 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,74 @@ +name: Release + +on: + push: + tags: + - '*' + +defaults: + run: + shell: bash + +jobs: + release: + strategy: + fail-fast: false + matrix: + target: + - aarch64-apple-darwin + - x86_64-apple-darwin + - x86_64-pc-windows-msvc + - x86_64-unknown-linux-gnu + include: + - target: aarch64-apple-darwin + os: macos-latest + target_rustflags: '' + - target: x86_64-apple-darwin + os: macos-latest + target_rustflags: '' + - target: x86_64-pc-windows-msvc + os: windows-latest + target_rustflags: '' + - target: x86_64-unknown-linux-gnu + os: ubuntu-latest + target_rustflags: '' + + runs-on: ${{matrix.os}} + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} + + - name: Release Type + id: release-type + run: | + if [[ ${{ github.ref }} =~ ^refs/tags/[0-9]+[.][0-9]+[.][0-9]+$ ]]; then + echo "value=release" >> $GITHUB_OUTPUT + else + echo "value=prerelease" >> $GITHUB_OUTPUT + fi + + - name: Package + id: package + env: + TARGET: ${{ matrix.target }} + REF: ${{ github.ref }} + OS: ${{ matrix.os }} + TARGET_RUSTFLAGS: ${{ matrix.target_rustflags }} + run: ./bin/package + shell: bash + + - name: Publish Archive + uses: softprops/action-gh-release@v2 + if: ${{ startsWith(github.ref, 'refs/tags/') }} + with: + draft: false + files: ${{ steps.package.outputs.archive }} + prerelease: ${{ steps.release-type.outputs.value == 'prerelease' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/bin/package b/bin/package new file mode 100755 index 0000000..6b29ac2 --- /dev/null +++ b/bin/package @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +VERSION=${REF#"refs/tags/"} +DIST=`pwd`/dist + +echo "Packaging entangle $VERSION for $TARGET..." + +test -f Cargo.lock || cargo generate-lockfile + +echo "Building entangle..." +RUSTFLAGS="--deny warnings $TARGET_RUSTFLAGS" \ + cargo build --bin entangle --target $TARGET --release +EXECUTABLE=target/$TARGET/release/entangle + +if [[ $OS == windows-latest ]]; then + EXECUTABLE=$EXECUTABLE.exe +fi + +echo "Copying release files..." +mkdir -p dist/entangle-$VERSION +cp \ + $EXECUTABLE \ + Cargo.lock \ + Cargo.toml \ + LICENSE \ + README.md \ + $DIST/entangle-$VERSION + +cd $DIST +echo "Creating release archive..." +case $OS in + ubuntu-latest | macos-latest) + ARCHIVE=$DIST/entangle-$VERSION-$TARGET.tar.gz + tar czf $ARCHIVE * + echo "archive=$ARCHIVE" >> $GITHUB_OUTPUT + ;; + windows-latest) + ARCHIVE=$DIST/entangle-$VERSION-$TARGET.zip + 7z a $ARCHIVE * + echo "archive=`pwd -W`/entangle-$VERSION-$TARGET.zip" >> $GITHUB_OUTPUT + ;; +esac From a27628d9024eddc04012062f6281099be3db09b9 Mon Sep 17 00:00:00 2001 From: parabit Date: Fri, 6 Feb 2026 17:53:14 -0600 Subject: [PATCH 2/3] update readme with badges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fd98608..5d8db2a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

entangle

- +
`entangle` is currently in early development check back soon. \ No newline at end of file From cefb4033abcb01e898babd173b0758b9d46d1952 Mon Sep 17 00:00:00 2001 From: parabit Date: Fri, 6 Feb 2026 17:59:46 -0600 Subject: [PATCH 3/3] add support for linux on arm --- .github/workflows/release.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a0cafb2..72de220 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,6 +16,7 @@ jobs: matrix: target: - aarch64-apple-darwin + - aarch64-unknown-linux-gnu - x86_64-apple-darwin - x86_64-pc-windows-msvc - x86_64-unknown-linux-gnu @@ -23,6 +24,9 @@ jobs: - target: aarch64-apple-darwin os: macos-latest target_rustflags: '' + - target: aarch64-unknown-linux-gnu + os: ubuntu-latest + target_rustflags: '--codegen linker=aarch64-linux-gnu-gcc' - target: x86_64-apple-darwin os: macos-latest target_rustflags: '' @@ -44,6 +48,10 @@ jobs: with: targets: ${{ matrix.target }} + - name: Install AArch64 Cross-Compilation Toolchain + if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }} + run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu + - name: Release Type id: release-type run: |