Skip to content

Commit

Permalink
Refactor build process to include separate checksum generation for Li…
Browse files Browse the repository at this point in the history
…nux binaries
  • Loading branch information
Aitthi committed Sep 29, 2024
1 parent 71d3dcf commit a39cf78
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/Ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,29 @@ jobs:
VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
echo "version=$VERSION" >> $GITHUB_OUTPUT
# - name: Build Linux binary x86_64-gnu
# run: |
# cross build --target x86_64-unknown-linux-gnu --release
# mkdir -p build/linux-gnu/
# cp target/x86_64-unknown-linux-gnu/release/easy-proxy build/linux-gnu/
- name: Build Linux binary x86_64-gnu
run: |
cross build --target x86_64-unknown-linux-gnu --release
mkdir -p build/linux/
cp target/x86_64-unknown-linux-gnu/release/easy-proxy build/linux/easy-proxy-x86_64-linux-gnu
# - name: Build Linux binary x86_64-musl
# run: |
# cross build --target x86_64-unknown-linux-musl --release
# mkdir -p build/linux-musl/
# cp target/x86_64-unknown-linux-musl/release/easy-proxy build/linux-musl/
- name: Build Linux binary x86_64-musl
run: |
cross build --target x86_64-unknown-linux-musl --release
mkdir -p build/linux/
cp target/x86_64-unknown-linux-musl/release/easy-proxy build/linux/easy-proxy-x86_64-linux-musl
- name: Build Linux binary aarch64-gnu
run: |
cross build --target aarch64-unknown-linux-gnu --release
mkdir -p build/linux/
cp target/aarch64-unknown-linux-gnu/release/easy-proxy build/linux/aarch64-easy-proxy-linux-gnu
cp target/aarch64-unknown-linux-gnu/release/easy-proxy build/linux/easy-proxy-aarch64-linux-gnu
# - name: Build Linux binary aarch64-musl
# run: |
# cross build --target aarch64-unknown-linux-musl --release
# mkdir -p build/linux-musl/
# cp target/aarch64-unknown-linux-musl/release/easy-proxy build/linux-musl/
- name: Build Linux binary aarch64-musl
run: |
cross build --target aarch64-unknown-linux-musl --release
mkdir -p build/linux/
cp target/aarch64-unknown-linux-musl/release/easy-proxy build/linux/easy-proxy-aarch64-linux-musl
- name: Generate Checksums
Expand All @@ -65,7 +65,10 @@ jobs:
with:
repository: ${{ github.repository }}
files: |
build/linux/aarch64-easy-proxy-linux-gnu
build/linux/easy-proxy-x86_64-linux-gnu
build/linux/easy-proxy-x86_64-linux-musl
build/linux/easy-proxy-aarch64-linux-gnu
build/linux/easy-proxy-aarch64-linux-musl
build/linux/linux-checksums.txt
tag_name: v${{ steps.extract_version.outputs.version }}
name: v${{ steps.extract_version.outputs.version }}
Expand Down
5 changes: 4 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ if [ -z "$LATEST_TAG" ]; then
exit 1
fi

# OS gun or musl
OS_TYPE=$(ldd --version | grep -q musl && echo "musl" || echo "gun")

# Construct download URLs
BINARY_NAME="$ARCH-$BINARY-$OS"
BINARY_NAME="$BINARY-$ARCH-$OS-$OS_TYPE"
echo "Binary name: $BINARY_NAME"
DOWNLOAD_URL="https://github.com/$REPO/releases/download/$LATEST_TAG/$BINARY_NAME"

Expand Down

0 comments on commit a39cf78

Please sign in to comment.