Skip to content

Commit

Permalink
Bump version to 0.20.0-alpha.1 and add more targets for release
Browse files Browse the repository at this point in the history
  • Loading branch information
chipsenkbeil committed Nov 20, 2022
1 parent 10141f2 commit a41ef59
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 38 deletions.
110 changes: 84 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ jobs:
run: |
sudo apt update
sudo apt install -y gcc-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
- name: Build binary (GNU aarch64)
- name: Build binary (GNU arm-v7)
run: |
cargo build --release --all-features --target ${{ env.ARMV7_GNU_ARCH }}
ls -l ./${{ env.ARMV7_GNU_DIR }}
Expand All @@ -199,30 +199,31 @@ jobs:
# NOTE: For musl, we only support ssh2 and not libssh for the time being due to some
# build issue with libssh-rs-sys not finding the symbol ENGINE_cleanup in libcrypto
linux_musl:
name: "Build release on Linux (musl)"
linux_musl_x86:
name: "Build release on Linux (musl x86)"
runs-on: ubuntu-latest
container:
image: alpine:3.14
if: startsWith(github.ref, 'refs/tags/')
env:
UPLOAD_NAME: linux64-musl
UPLOAD_NAME: linux64-musl-x86
X86_MUSL_ARCH: x86_64-unknown-linux-musl
X86_MUSL_DIR: target/x86_64-unknown-linux-musl/release
BUILD_BIN: distant
X86_MUSL_REL_BIN: distant-linux64-musl
X86_MUSL_REL_BIN: distant-linux64-musl-x86
steps:
- uses: actions/checkout@v2
- name: Install base dependencies
run: |
apk add --update --no-cache build-base libc6-compat curl perl
- name: Install Rust (MUSL)
- name: Install Rust (MUSL x86)
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ env.X86_MUSL_ARCH }}
override: true
- name: Install musl tools
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal
sudo apt install -y musl-tools
- uses: Swatinem/rust-cache@v2
- name: Build binary (MUSL x86_64)
run: |
source $HOME/.cargo/env
cargo build --release --no-default-features --features ssh2 --target ${{ env.X86_MUSL_ARCH }}
ls -l ./${{ env.X86_MUSL_DIR }}
strip ./${{ env.X86_MUSL_DIR }}/${{ env.BUILD_BIN }}
Expand All @@ -235,8 +236,55 @@ jobs:
path: |
${{ env.X86_MUSL_REL_BIN }}
# NOTE: For musl, we only support ssh2 and not libssh for the time being due to some
# build issue with libssh-rs-sys not finding the symbol ENGINE_cleanup in libcrypto
linux_musl_aarch64:
name: "Build release on Linux (musl aarch64)"
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
env:
UPLOAD_NAME: linux64-musl-aarch64
AARCH64_MUSL_ARCH: aarch64-unknown-linux-musl
AARCH64_MUSL_DIR: target/aarch64-unknown-linux-musl/release
BUILD_BIN: distant
AARCH64_MUSL_REL_BIN: distant-linux64-musl-aarch64
steps:
- uses: actions/checkout@v2
- name: Install Rust (MUSL aarch64)
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ env.AARCH64_MUSL_ARCH }}
override: true
- name: Install musl tools
run: |
sudo apt install -y musl-tools gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: Install cross
env:
LINK: https://github.com/cross-rs/cross/releases/download
CROSS_VERSION: 0.2.4
CROSS_FILE: cross-x86_64-unknown-linux-musl
run: |
curl -L "$LINK/v$CROSS_VERSION/$CROSS_FILE.tar.gz" |
tar xz -C $HOME/.cargo/bin
- uses: Swatinem/rust-cache@v2
- name: Build binary (MUSL aarch64)
run: |
cross build --release --no-default-features --features ssh2 --target ${{ env.AARCH64_MUSL_ARCH }}
ls -l ./${{ env.AARCH64_MUSL_DIR }}
aarch64-linux-gnu-strip ./${{ env.AARCH64_MUSL_DIR }}/${{ env.BUILD_BIN }}
mv ./${{ env.AARCH64_MUSL_DIR }}/${{ env.BUILD_BIN }} ./${{ env.AARCH64_MUSL_REL_BIN }}
chmod +x ./${{ env.AARCH64_MUSL_REL_BIN }}
- name: Upload
uses: actions/upload-artifact@v2
with:
name: ${{ env.UPLOAD_NAME }}
path: |
${{ env.AARCH64_MUSL_REL_BIN }}
publish:
needs: [macos, windows, linux_gnu_x86, linux_gnu_aarch64, linux_gnu_arm_v7, linux_musl]
needs: [macos, windows, linux_gnu_x86, linux_gnu_aarch64, linux_gnu_arm_v7, linux_musl_x86, linux_musl_aarch64]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
Expand All @@ -252,8 +300,10 @@ jobs:
LINUX64_GNU_AARCH64_BIN: distant-linux64-gnu-aarch64
LINUX64_GNU_ARMV7: linux64-gnu-arm-v7
LINUX64_GNU_ARMV7_BIN: distant-linux64-gnu-arm-v7
LINUX64_MUSL: linux64-musl
LINUX64_MUSL_BIN: distant-linux64-musl
LINUX64_MUSL_X86: linux64-musl-x86
LINUX64_MUSL_X86_BIN: distant-linux64-musl-x86
LINUX64_MUSL_AARCH64: linux64-musl-aarch64
LINUX64_MUSL_AARCH64_BIN: distant-linux64-musl-aarch64
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
Expand All @@ -270,23 +320,28 @@ jobs:
- name: Generate Linux64 (gnu x86) SHA256 checksums
run: |
cd ${{ env.LINUX64_GNU_X86 }}
sha256sum ${{ env.LINUX64_GNU_X86_BIN }} > ${{ env.LINUX64_GNU_BIN }}.sha256sum
sha256sum ${{ env.LINUX64_GNU_X86_BIN }} > ${{ env.LINUX64_GNU_X86_BIN }}.sha256sum
echo "SHA_LINUX64_GNU_X86_BIN=$(cat ${{ env.LINUX64_GNU_X86_BIN }}.sha256sum)" >> $GITHUB_ENV
- name: Generate Linux64 (gnu aarch64) SHA256 checksums
run: |
cd ${{ env.LINUX64_GNU_AARCH64 }}
sha256sum ${{ env.LINUX64_GNU_AARCH64_BIN }} > ${{ env.LINUX64_GNU_BIN }}.sha256sum
sha256sum ${{ env.LINUX64_GNU_AARCH64_BIN }} > ${{ env.LINUX64_GNU_AARCH64_BIN }}.sha256sum
echo "SHA_LINUX64_GNU_AARCH64_BIN=$(cat ${{ env.LINUX64_GNU_AARCH64_BIN }}.sha256sum)" >> $GITHUB_ENV
- name: Generate Linux64 (gnu arm-v7) SHA256 checksums
run: |
cd ${{ env.LINUX64_GNU_ARMV7 }}
sha256sum ${{ env.LINUX64_GNU_ARMV7_BIN }} > ${{ env.LINUX64_GNU_BIN }}.sha256sum
sha256sum ${{ env.LINUX64_GNU_ARMV7_BIN }} > ${{ env.LINUX64_GNU_ARMV7_BIN }}.sha256sum
echo "SHA_LINUX64_GNU_ARMV7_BIN=$(cat ${{ env.LINUX64_GNU_ARMV7_BIN }}.sha256sum)" >> $GITHUB_ENV
- name: Generate Linux64 (musl) SHA256 checksums
- name: Generate Linux64 (musl x86) SHA256 checksums
run: |
cd ${{ env.LINUX64_MUSL_X86 }}
sha256sum ${{ env.LINUX64_MUSL_X86_BIN }} > ${{ env.LINUX64_MUSL_X86_BIN }}.sha256sum
echo "SHA_LINUX64_MUSL_X86_BIN=$(cat ${{ env.LINUX64_MUSL_X86_BIN }}.sha256sum)" >> $GITHUB_ENV
- name: Generate Linux64 (musl aarch64) SHA256 checksums
run: |
cd ${{ env.LINUX64_MUSL }}
sha256sum ${{ env.LINUX64_MUSL_BIN }} > ${{ env.LINUX64_MUSL_BIN }}.sha256sum
echo "SHA_LINUX64_MUSL_BIN=$(cat ${{ env.LINUX64_MUSL_BIN }}.sha256sum)" >> $GITHUB_ENV
cd ${{ env.LINUX64_MUSL_AARCH64 }}
sha256sum ${{ env.LINUX64_MUSL_AARCH64_BIN }} > ${{ env.LINUX64_MUSL_AARCH64_BIN }}.sha256sum
echo "SHA_LINUX64_MUSL_AARCH64_BIN=$(cat ${{ env.LINUX64_MUSL_AARCH64_BIN }}.sha256sum)" >> $GITHUB_ENV
- name: Determine git tag
if: github.event_name == 'push'
run: |
Expand Down Expand Up @@ -322,7 +377,8 @@ jobs:
${{ env.LINUX64_GNU_X86 }}/${{ env.LINUX64_GNU_X86_BIN }}
${{ env.LINUX64_GNU_AARCH64 }}/${{ env.LINUX64_GNU_AARCH64_BIN }}
${{ env.LINUX64_GNU_ARMV7 }}/${{ env.LINUX64_GNU_ARMV7_BIN }}
${{ env.LINUX64_MUSL }}/${{ env.LINUX64_MUSL_BIN }}
${{ env.LINUX64_MUSL_X86 }}/${{ env.LINUX64_MUSL_X86_BIN }}
${{ env.LINUX64_MUSL_AARCH64 }}/${{ env.LINUX64_MUSL_AARCH64_BIN }}
**/*.sha256sum
body: |
## Release Notes
Expand All @@ -332,7 +388,8 @@ jobs:
- **linux64-gnu-x86** is the x86-64 release on Linux using libc
- **linux64-gnu-aarch64** is the aarch64 release on Linux using libc
- **linux64-gnu-arm-v7** is the arm-v7 release on Linux using libc (for Raspberry PI)
- **linux64-musl** is the x86-64 release on Linux using musl (static binary, no libc dependency)
- **linux64-musl-x86** is the x86-64 release on Linux using musl (static binary, no libc dependency)
- **linux64-musl-aarch64** is the aarch64 release on Linux using musl (static binary, no libc dependency)
- **macos** is a universal binary for Mac OS that supports x86-64 and aarch64 (ARM) platforms
- **win64** is the x86-64 release on Windows using MSVC
## SHA256 Checksums
Expand All @@ -342,5 +399,6 @@ jobs:
${{ env.SHA_LINUX64_GNU_X86_BIN }}
${{ env.SHA_LINUX64_GNU_AARCH64_BIN }}
${{ env.SHA_LINUX64_GNU_ARMV7_BIN }}
${{ env.SHA_LINUX64_MUSL_BIN }}
${{ env.SHA_LINUX64_MUSL_X86_BIN }}
${{ env.SHA_LINUX64_MUSL_AARCH64_BIN }}
```
8 changes: 4 additions & 4 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "distant"
description = "Operate on a remote computer through file and process manipulation"
categories = ["command-line-utilities"]
keywords = ["cli"]
version = "0.20.0"
version = "0.20.0-alpha.1"
authors = ["Chip Senkbeil <[email protected]>"]
edition = "2021"
homepage = "https://github.com/chipsenkbeil/distant"
Expand Down Expand Up @@ -32,7 +32,7 @@ clap_complete = "3.2.3"
config = { version = "0.13.2", default-features = false, features = ["toml"] }
derive_more = { version = "0.99.17", default-features = false, features = ["display", "from", "error", "is_variant"] }
dialoguer = { version = "0.10.2", default-features = false }
distant-core = { version = "=0.20.0", path = "distant-core", features = ["clap", "schemars"] }
distant-core = { version = "=0.20.0-alpha.1", path = "distant-core", features = ["clap", "schemars"] }
directories = "4.0.1"
flexi_logger = "0.24.1"
indoc = "1.0.7"
Expand All @@ -54,7 +54,7 @@ winsplit = "0.1.0"
whoami = "1.2.1"

# Optional native SSH functionality
distant-ssh2 = { version = "=0.20.0", path = "distant-ssh2", default-features = false, features = ["serde"], optional = true }
distant-ssh2 = { version = "=0.20.0-alpha.1", path = "distant-ssh2", default-features = false, features = ["serde"], optional = true }

[target.'cfg(unix)'.dependencies]
fork = "0.1.19"
Expand Down
4 changes: 2 additions & 2 deletions distant-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "distant-core"
description = "Core library for distant, enabling operation on a remote computer through file and process manipulation"
categories = ["network-programming"]
keywords = ["api", "async"]
version = "0.20.0"
version = "0.20.0-alpha.1"
authors = ["Chip Senkbeil <[email protected]>"]
edition = "2021"
homepage = "https://github.com/chipsenkbeil/distant"
Expand All @@ -19,7 +19,7 @@ async-trait = "0.1.57"
bitflags = "1.3.2"
bytes = "1.2.1"
derive_more = { version = "0.99.17", default-features = false, features = ["as_mut", "as_ref", "deref", "deref_mut", "display", "from", "error", "into", "into_iterator", "is_variant", "try_into"] }
distant-net = { version = "=0.20.0", path = "../distant-net" }
distant-net = { version = "=0.20.0-alpha.1", path = "../distant-net" }
futures = "0.3.21"
grep = "0.2.10"
hex = "0.4.3"
Expand Down
2 changes: 1 addition & 1 deletion distant-net/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "distant-net"
description = "Network library for distant, providing implementations to support client/server architecture"
categories = ["network-programming"]
keywords = ["api", "async"]
version = "0.20.0"
version = "0.20.0-alpha.1"
authors = ["Chip Senkbeil <[email protected]>"]
edition = "2021"
homepage = "https://github.com/chipsenkbeil/distant"
Expand Down
4 changes: 2 additions & 2 deletions distant-ssh2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "distant-ssh2"
description = "Library to enable native ssh-2 protocol for use with distant sessions"
categories = ["network-programming"]
version = "0.20.0"
version = "0.20.0-alpha.1"
authors = ["Chip Senkbeil <[email protected]>"]
edition = "2021"
homepage = "https://github.com/chipsenkbeil/distant"
Expand All @@ -20,7 +20,7 @@ async-compat = "0.2.1"
async-once-cell = "0.4.2"
async-trait = "0.1.57"
derive_more = { version = "0.99.17", default-features = false, features = ["display", "error"] }
distant-core = { version = "=0.20.0", path = "../distant-core" }
distant-core = { version = "=0.20.0-alpha.1", path = "../distant-core" }
futures = "0.3.21"
hex = "0.4.3"
log = "0.4.17"
Expand Down

0 comments on commit a41ef59

Please sign in to comment.