From d4ac16ce183eebb1ff80d3ecd0acbe3290dfd38b Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 24 Aug 2024 12:31:20 +0200 Subject: [PATCH] Support linux-aarch64 --- .github/workflows/ci.yml | 22 +++++++++++++++------- README.md | 2 +- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cc09fb..a6b025c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,6 +76,9 @@ jobs: matrix: runs-on: - ubuntu-latest + arch: + - x86_64 + - aarch64 steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 @@ -83,18 +86,18 @@ jobs: profile: minimal toolchain: stable override: true - target: x86_64-unknown-linux-musl + target: ${{ matrix.arch }}-unknown-linux-musl - run: sudo apt install -y musl-tools - uses: actions-rs/cargo@v1 with: command: build - args: --release --target x86_64-unknown-linux-musl + args: --release --target ${{ matrix.arch }} -unknown-linux-musl - name: Upload Release Asset id: upload-release-asset uses: actions/upload-artifact@v1 with: - name: ubpkg-${{ matrix.runs-on }} - path: target/x86_64-unknown-linux-musl/release/ubpkg + name: ubpkg-${{ matrix.runs-on }}-${{ matrix.arch }} + path: target/${{ matrix.arch }} -unknown-linux-musl/release/ubpkg build-release-mac: needs: [check, test, fmt, clippy] @@ -157,10 +160,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Download Linux build + - name: Download Linux x86_64 build + uses: actions/download-artifact@v1 + with: + name: ubpkg-ubuntu-latest-x86_64 + - name: Download Linux aarch64 build uses: actions/download-artifact@v1 with: - name: ubpkg-ubuntu-latest + name: ubpkg-ubuntu-latest-aarch64 - name: Download macOS build uses: actions/download-artifact@v1 with: @@ -171,7 +178,8 @@ jobs: name: ubpkg-windows-latest - name: Create release run: | - mv ubpkg-ubuntu-latest/ubpkg ubpkg-linux + mv ubpkg-ubuntu-latest-x86_64/ubpkg ubpkg-linux-x86_64 + mv ubpkg-ubuntu-latest-aarch64/ubpkg ubpkg-linux-aarch64 mv ubpkg-macos-latest/ubpkg ubpkg-macos mv ubpkg-windows-latest/ubpkg.exe ubpkg.exe d=$(date "+%Y-%m-%d_%H%M") diff --git a/README.md b/README.md index 99cffc7..dd9c7ea 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ### Installation ``` -$ wget https://github.com/alexpdp7/ubpkg/releases/latest/download/ubpkg-linux -O ~/.local/bin/ubpkg # or some other directory in your $PATH you can write to +$ wget https://github.com/alexpdp7/ubpkg/releases/latest/download/ubpkg-linux-x86_64 -O ~/.local/bin/ubpkg # or some other directory in your $PATH you can write to $ chmod +x ~/.local/bin/ubpkg ```