diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a1762b..d11365c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ env: CARGO_TERM_COLOR: always jobs: - # Build the app on all supported platforms + # Build the app on all supported platforms, at least for the time being build: strategy: matrix: @@ -24,6 +24,10 @@ jobs: host: ubuntu-latest target: x86_64-unknown-linux-musl rust: stable + - build: aarch64-musl + host: ubuntu-latest + target: aarch64-unknown-linux-musl + rust: stable runs-on: ${{ matrix.host }} steps: - uses: actions/checkout@v4 @@ -31,17 +35,25 @@ jobs: uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} + targets: ${{ matrix.target }} + - uses: taiki-e/install-action@v2 + with: + tool: cross #- name: Set minimal profile (Windows only) # if: matrix.host == 'windows-latest' # run: rustup set profile minimal - uses: Swatinem/rust-cache@v2 with: - key: "${{matrix.build}}" + key: "${{ matrix.build }}" - name: install packages (ubuntu) if: startsWith(matrix.host, 'ubuntu') run: scripts/install-ubuntu-packages - name: Build - run: cargo build --locked + run: cross build --locked --target ${{ matrix.target }} + - uses: actions/upload-artifact@v4 + with: + name: qcp-bin-${{ matrix.target }} + path: target/${{ matrix.target }}/debug/qcp # We only need to run the checks on a single platform checks: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e3e8d3c..7454bc0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,10 +3,13 @@ name: release on: release: types: [published] - # useful for testing + # running on push is sometimes useful for testing; also enable WORKFLOW_TEST #push: # branches: - # - misc/ci-auto-release + # - misc/build-aarch64 + +env: + WORKFLOW_TEST: false permissions: contents: write @@ -20,6 +23,10 @@ jobs: host: ubuntu-latest target: x86_64-unknown-linux-musl rust: stable + - build: aarch64-musl + host: ubuntu-latest + target: aarch64-unknown-linux-musl + rust: stable runs-on: ${{ matrix.host }} steps: - uses: actions/checkout@v4 @@ -27,6 +34,10 @@ jobs: uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} + targets: ${{ matrix.target }} + - uses: taiki-e/install-action@v2 + with: + tool: cross - uses: Swatinem/rust-cache@v2 with: key: "${{matrix.build}}" @@ -43,9 +54,9 @@ jobs: leading-dir: true tar: unix zip: windows - # dry_run: true # when testing the workflow + dry_run: ${{ env.WORKFLOW_TEST }} # Uploading the artifact is useful when testing the workflow in dry-run mode - uses: actions/upload-artifact@v4 with: - name: binary-${{ matrix.target }} + name: qcp-tarball-${{ matrix.target }} path: ${{ steps.build.outputs.archive }}.tar.gz diff --git a/Cargo.toml b/Cargo.toml index 89550d7..98bd1f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -88,3 +88,5 @@ unescaped_backticks = "deny" [package.metadata.cross.target.x86_64-unknown-linux-musl] pre-build = [ "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install capnproto" ] +[package.metadata.cross.target.aarch64-unknown-linux-musl] +pre-build = [ "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install capnproto" ] diff --git a/README.md b/README.md index ee252c8..340e35d 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ high-performance remote file copy utility for long-distance internet connections #### Platform support status -- Well tested: Debian and Ubuntu using OpenSSH -- Tested: Ubuntu on WSL +- Well tested: Debian and Ubuntu on x86_64, using OpenSSH +- Tested: Ubuntu on WSL; aarch64 (Raspbian) - Untested: OSX/BSD family - Not currently supported: Windows @@ -26,6 +26,17 @@ high-performance remote file copy utility for long-distance internet connections * Install the `qcp` binary on both machines. It needs to be in your `PATH` on the remote machine. * Run `qcp --help-buffers` and follow its instructions. +### Installing pre-built binaries + +These can be found on the [latest release](https://github.com/crazyscot/qcp/releases/latest). + +* Linux x86_64: x86_64-unknown-linux-musl +* Linux aarch64: aarch64-unknown-linux-musl + +The binaries are statically linked. Linux builds should work on all recent distributions, as long as you have selected the correct CPU architecture. + +### Installation from source + Install it from crates.io using `cargo`: ```bash