From 47d23673e61af3881f4704c83cc5305bd2f813b1 Mon Sep 17 00:00:00 2001 From: Christian Visintin Date: Mon, 10 Nov 2025 16:43:25 +0100 Subject: [PATCH] ci: Build artifacts for Windows x86_64 and Ubuntu x86_64 (#368) --- .github/workflows/build-artifacts.yml | 75 ++++++++++++++++++++++++--- Cargo.lock | 14 ++--- 2 files changed, 75 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index f1146f1..7f90743 100644 --- a/.github/workflows/build-artifacts.yml +++ b/.github/workflows/build-artifacts.yml @@ -14,13 +14,23 @@ jobs: platform: - release_for: MacOS-x86_64 os: macos-latest + platform: macos target: x86_64-apple-darwin - script: macos.sh - - release_for: MacOS-M1 + - release_for: MacOS-aarch64 os: macos-latest + platform: macos target: aarch64-apple-darwin - script: macos.sh + + - release_for: Linux-x86_64 + os: ubuntu-latest + platform: linux + target: x86_64-unknown-linux-gnu + + - release_for: Windows-x86_64 + os: windows-latest + platform: windows + target: x86_64-pc-windows-msvc runs-on: ${{ matrix.platform.os }} steps: @@ -29,7 +39,42 @@ jobs: with: toolchain: stable targets: ${{ matrix.platform.target }} - - name: Install dependencies + + - name: Install dependencies (Linux) + if: matrix.platform.platform == 'linux' + run: | + sudo apt-get update + sudo apt-get install -y \ + make \ + libgit2-dev \ + build-essential \ + pkg-config \ + libbsd-dev \ + libcap-dev \ + libcups2-dev \ + libgnutls28-dev \ + libicu-dev \ + libjansson-dev \ + libkeyutils-dev \ + libldap2-dev \ + zlib1g-dev \ + libpam0g-dev \ + libacl1-dev \ + libarchive-dev \ + flex \ + bison \ + libntirpc-dev \ + libtracker-sparql-3.0-dev \ + libglib2.0-dev \ + libdbus-1-dev \ + libsasl2-dev \ + libunistring-dev \ + libdbus-1-dev \ + cpanminus; + sudo cpanm Parse::Yapp::Driver + + - name: Install dependencies (MacOS) + if: matrix.platform.platform == 'macos' run: | brew update brew install \ @@ -66,18 +111,34 @@ jobs: brew link --force openldap brew link --force zlib cpanm Parse::Yapp::Driver - - name: Build release + - name: Build release (MacOS Intel) + if: matrix.platform.target == 'x86_64-apple-darwin' + run: cargo build --release --no-default-features --features keyring --target ${{ matrix.platform.target }} + + - name: Build release (others) + if: matrix.platform.target != 'x86_64-apple-darwin' run: cargo build --release --features smb-vendored --target ${{ matrix.platform.target }} - - name: Prepare artifact files + - name: Prepare artifact files (Posix) + if: matrix.platform.platform != 'windows' run: | mkdir -p .artifact mv target/${{ matrix.platform.target }}/release/termscp .artifact/termscp tar -czf .artifact/termscp-v${{ env.TERMSCP_VERSION }}-${{ matrix.platform.target }}.tar.gz -C .artifact termscp ls -l .artifact/ - - name: "Upload artifact" + - name: Upload artifact (Posix) + if: matrix.platform.platform != 'windows' uses: actions/upload-artifact@v4 with: if-no-files-found: error retention-days: 1 name: termscp-${{ matrix.platform.target }} path: .artifact/termscp-v${{ env.TERMSCP_VERSION }}-${{ matrix.platform.target }}.tar.gz + + - name: Upload artifact (Windows) + if: matrix.platform.platform == 'windows' + uses: actions/upload-artifact@v4 + with: + if-no-files-found: error + retention-days: 1 + name: termscp-${{ matrix.platform.target }} + path: target/${{ matrix.platform.target }}/release/termscp.exe diff --git a/Cargo.lock b/Cargo.lock index adf87f4..7038a61 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1272,7 +1272,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -3022,9 +3022,9 @@ checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "pavao" -version = "0.2.13" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c62e3a544910e4a9bbb56218bad91593b79a27c676e54a36097200d10d2d6e" +checksum = "f716d52d838ee3062b42302f328d6a3ecfb0006b651707886fa890e8951c7cf7" dependencies = [ "cfg_aliases", "lazy_static", @@ -3036,9 +3036,9 @@ dependencies = [ [[package]] name = "pavao-src" -version = "4.22.0" +version = "4.22.0-3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29b20a487b78fd44d081eb16717d062f78cae52888a7affeed1e7da3be1b9247" +checksum = "18364b5a8ff85f60fcca22e0d21a60f50ab4b9152d51f7358f3b42bbace88aab" dependencies = [ "cc", "git2", @@ -3047,9 +3047,9 @@ dependencies = [ [[package]] name = "pavao-sys" -version = "0.2.13" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e72a8efe4193b073995a99981a288cfef121027d12c420c647c2f19d4103d4" +checksum = "51792a86ac195a0e5b7a942f5b62e8f9494a260a5febe31673c5e7bb72ade55f" dependencies = [ "cc", "libc",