diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4854edae..8c35fd5e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -120,13 +120,25 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: - - ubuntu-24.04 - - ubuntu-24.04-arm - - windows-latest - - windows-11-arm - - macos-15-intel # x86 - - macos-latest # arm64 + include: + - os: ubuntu-24.04 + asset: sysand-linux-x86_64 + ext: tar.xz + - os: ubuntu-24.04-arm + asset: sysand-linux-arm64 + ext: tar.xz + - os: windows-latest + asset: sysand-windows-x86_64 + ext: zip + - os: windows-11-arm + asset: sysand-windows-arm64 + ext: zip + - os: macos-15-intel + asset: sysand-macos-x86_64 + ext: tar.xz + - os: macos-latest + asset: sysand-macos-arm64 + ext: tar.xz steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 @@ -134,17 +146,24 @@ jobs: - name: cargo build ... run: cargo build --locked --bin sysand --release - - name: Relocate binaries + - name: Package binary (unix) + if: runner.os != 'Windows' run: | - mkdir -p dist - ext=${{ (matrix.os == 'windows-latest' || matrix.os == 'windows-11-arm') && '.exe' || '' }} - cp target/release/sysand${ext} dist/sysand-${{ matrix.os }}${ext} + mkdir dist + tar -cJf "dist/${{ matrix.asset }}.tar.xz" -C target/release sysand + + - name: Package binary (windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + mkdir dist + Compress-Archive -DestinationPath "dist\${{ matrix.asset }}.zip" -Path target\release\sysand.exe - name: Upload binaries uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 with: - name: sysand-cli-${{ matrix.os }} - path: dist + name: ${{ matrix.asset }} + path: dist/${{ matrix.asset }}.${{ matrix.ext }} if-no-files-found: error ci-gate: @@ -180,15 +199,6 @@ jobs: with: subject-path: "artifacts/*" - - name: Rename artifacts - run: | - mv artifacts/sysand-ubuntu-24.04 artifacts/sysand-linux-x86_64 - mv artifacts/sysand-ubuntu-24.04-arm artifacts/sysand-linux-arm64 - mv artifacts/sysand-windows-latest.exe artifacts/sysand-windows-x86_64.exe - mv artifacts/sysand-windows-11-arm.exe artifacts/sysand-windows-arm64.exe - mv artifacts/sysand-macos-15-intel artifacts/sysand-macos-x86_64 - mv artifacts/sysand-macos-latest artifacts/sysand-macos-arm64 - - name: Create a nightly release run: | NEW_TAG=$(date +v-%Y-%m-%d-%H%M) @@ -196,7 +206,7 @@ jobs: --title "Nightly Release $NEW_TAG" \ --prerelease \ --target "$GITHUB_SHA" \ - artifacts/* + artifacts/sysand-*.tar.xz artifacts/sysand-*.zip env: GH_TOKEN: ${{ github.token }} GH_REPO: ${{ github.repository }} @@ -223,21 +233,12 @@ jobs: with: subject-path: "artifacts/*" - - name: Rename artifacts - run: | - mv artifacts/sysand-ubuntu-24.04 artifacts/sysand-linux-x86_64 - mv artifacts/sysand-ubuntu-24.04-arm artifacts/sysand-linux-arm64 - mv artifacts/sysand-windows-latest.exe artifacts/sysand-windows-x86_64.exe - mv artifacts/sysand-windows-11-arm.exe artifacts/sysand-windows-arm64.exe - mv artifacts/sysand-macos-15-intel artifacts/sysand-macos-x86_64 - mv artifacts/sysand-macos-latest artifacts/sysand-macos-arm64 - - name: Create a release run: | gh release create "$TRIGGERING_TAG" \ --title "Release $TRIGGERING_TAG" \ --verify-tag \ - artifacts/* + artifacts/sysand-*.tar.xz artifacts/sysand-*.zip env: GH_TOKEN: ${{ github.token }} GH_REPO: ${{ github.repository }} diff --git a/docs/src/getting_started/installation.md b/docs/src/getting_started/installation.md index afaf977d..64d3f566 100644 --- a/docs/src/getting_started/installation.md +++ b/docs/src/getting_started/installation.md @@ -59,19 +59,23 @@ or from [latest GitHub release][gh_rel]. x86_x64 - - - + + + ARM64 - - - + + + -After downloading the appropriate file, installation depends on your platform: + +The download is an archive (`.zip` on Windows, `.tar.xz` on macOS and +Linux) containing a single `sysand` executable (`sysand.exe` on +Windows). After downloading, extract the archive and follow the steps +for your platform: - [Windows (both x86_64 and ARM64)](#windows) - [macOS (both Intel and ARM64 (a.k.a. Apple Silicon))](#macos) @@ -81,13 +85,14 @@ It is recommended to then [verify the installation](#verify-the-installation). ### Windows -The downloaded binary can either be installed manually or by running -a few PowerShell commands. +The downloaded `.zip` archive contains `sysand.exe`. It can either be +installed manually or by running a few PowerShell commands. #### Manual installation -1. Move the downloaded `.exe` file to `%LOCALAPPDATA%\Programs\Sysand\sysand.exe` -2. Add to `PATH` via Environment Variables: +1. Right-click the downloaded `.zip` file and choose "Extract All..." +2. Move the extracted `sysand.exe` to `%LOCALAPPDATA%\Programs\Sysand\sysand.exe` +3. Add to `PATH` via Environment Variables: 1. Open "Environment Variables" (search in Start menu) 2. Under "User variables", select "Path" and click "Edit" 3. Click "New" and add `%LOCALAPPDATA%\Programs\Sysand` @@ -101,15 +106,17 @@ a few PowerShell commands. ```powershell # For x86_64 systems -# Create directory and move to it +# Create directory and extract the archive into it mkdir "$env:LOCALAPPDATA\Programs\Sysand" -Force -mv sysand-windows-x86_64.exe "$env:LOCALAPPDATA\Programs\Sysand\sysand.exe" +Expand-Archive -Path sysand-windows-x86_64.zip ` + -DestinationPath "$env:LOCALAPPDATA\Programs\Sysand" -Force # For ARM64 systems -# Create directory and move to it +# Create directory and extract the archive into it mkdir "$env:LOCALAPPDATA\Programs\Sysand" -Force -mv sysand-windows-arm64.exe "$env:LOCALAPPDATA\Programs\Sysand\sysand.exe" +Expand-Archive -Path sysand-windows-arm64.zip ` + -DestinationPath "$env:LOCALAPPDATA\Programs\Sysand" -Force ``` 3. Add folder to `PATH`: @@ -131,17 +138,17 @@ if ($currentPath -notlike "*$newPath*") { #### System installation (requires `sudo`) 1. Open Terminal -2. Make the binary executable and move to a folder in `PATH` by running the - following commands: +2. Extract the archive and move the `sysand` binary to a folder in + `PATH` by running the following commands: ```sh # For Intel Macs -chmod +x ~/Downloads/sysand-macos-x86_64 -sudo mv ~/Downloads/sysand-macos-x86_64 /usr/local/bin/sysand +tar -xJf ~/Downloads/sysand-macos-x86_64.tar.xz -C ~/Downloads +sudo mv ~/Downloads/sysand /usr/local/bin/sysand # For Apple Silicon Macs -chmod +x ~/Downloads/sysand-macos-arm64 -sudo mv ~/Downloads/sysand-macos-arm64 /usr/local/bin/sysand +tar -xJf ~/Downloads/sysand-macos-arm64.tar.xz -C ~/Downloads +sudo mv ~/Downloads/sysand /usr/local/bin/sysand ``` #### Alternative: user installation (no `sudo` required) @@ -169,17 +176,17 @@ source ~/.zshrc #### System installation (requires `sudo`) 1. Open a terminal -2. Make the binary executable and move to a folder in `PATH` by running the - following commands: +2. Extract the archive and move the `sysand` binary to a folder in + `PATH` by running the following commands: ```sh # For x86_64 systems -chmod +x sysand-linux-x86_64 -sudo mv sysand-linux-x86_64 /usr/local/bin/sysand +tar -xJf sysand-linux-x86_64.tar.xz +sudo mv sysand /usr/local/bin/sysand # For ARM64 systems -chmod +x sysand-linux-arm64 -sudo mv sysand-linux-arm64 /usr/local/bin/sysand +tar -xJf sysand-linux-arm64.tar.xz +sudo mv sysand /usr/local/bin/sysand ``` #### Alternative: user installation (no `sudo` required)