licensing: adopt MIT+OpenAI/Anthropic rider metadata #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Install Test | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'install.sh' | |
| - 'install.ps1' | |
| - '.github/workflows/install-test.yml' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'install.sh' | |
| - 'install.ps1' | |
| - '.github/workflows/install-test.yml' | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_LOG: debug | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Real install E2E test on Linux with actual Rust tooling | |
| install-linux: | |
| name: Install Test (Linux) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2 | |
| - name: Build release binary | |
| run: cargo build --release | |
| - name: Create test artifact | |
| run: | | |
| mkdir -p test-artifacts | |
| cp target/release/cass test-artifacts/ | |
| cd test-artifacts | |
| tar -czvf cass-vtest-linux-x86_64.tar.gz cass | |
| sha256sum cass-vtest-linux-x86_64.tar.gz > cass-vtest-linux-x86_64.tar.gz.sha256 | |
| echo "=== Test artifact created ===" | |
| ls -la | |
| cat cass-vtest-linux-x86_64.tar.gz.sha256 | |
| - name: Run install.sh with real tooling | |
| id: install | |
| run: | | |
| set -euo pipefail | |
| # Create isolated install directory | |
| INSTALL_DIR=$(mktemp -d) | |
| echo "install_dir=$INSTALL_DIR" >> $GITHUB_OUTPUT | |
| # Log environment | |
| echo "=== Environment ===" | tee install-test.log | |
| echo "Rust version: $(rustc --version)" | tee -a install-test.log | |
| echo "Cargo version: $(cargo --version)" | tee -a install-test.log | |
| echo "Install dir: $INSTALL_DIR" | tee -a install-test.log | |
| echo "" | tee -a install-test.log | |
| # Run installer with real artifact | |
| ARTIFACT_PATH="$(pwd)/test-artifacts/cass-vtest-linux-x86_64.tar.gz" | |
| CHECKSUM=$(cat test-artifacts/cass-vtest-linux-x86_64.tar.gz.sha256 | cut -d' ' -f1) | |
| echo "=== Running install.sh ===" | tee -a install-test.log | |
| echo "ARTIFACT_URL: file://$ARTIFACT_PATH" | tee -a install-test.log | |
| echo "CHECKSUM: $CHECKSUM" | tee -a install-test.log | |
| echo "" | tee -a install-test.log | |
| # Run the installer with env vars set inline (like macOS job) | |
| ARTIFACT_URL="file://$ARTIFACT_PATH" \ | |
| CHECKSUM="$CHECKSUM" \ | |
| RUSTUP_INIT_SKIP=1 \ | |
| timeout 60s bash install.sh \ | |
| --version vtest \ | |
| --easy-mode \ | |
| --verify \ | |
| --dest "$INSTALL_DIR" \ | |
| 2>&1 | tee -a install-test.log | |
| echo "" | tee -a install-test.log | |
| echo "=== Install completed ===" | tee -a install-test.log | |
| - name: Verify installation | |
| run: | | |
| INSTALL_DIR="${{ steps.install.outputs.install_dir }}" | |
| echo "=== Verification ===" | tee -a install-test.log | |
| # Check binary exists | |
| if [ ! -f "$INSTALL_DIR/cass" ]; then | |
| echo "ERROR: Binary not found at $INSTALL_DIR/cass" | tee -a install-test.log | |
| echo "Contents of install dir:" | tee -a install-test.log | |
| ls -la "$INSTALL_DIR" | tee -a install-test.log | |
| exit 1 | |
| fi | |
| echo "OK: Binary exists at $INSTALL_DIR/cass" | tee -a install-test.log | |
| # Check binary is executable | |
| if [ ! -x "$INSTALL_DIR/cass" ]; then | |
| echo "ERROR: Binary is not executable" | tee -a install-test.log | |
| exit 1 | |
| fi | |
| echo "OK: Binary is executable" | tee -a install-test.log | |
| # Run binary help | |
| echo "" | tee -a install-test.log | |
| echo "=== Binary --help output ===" | tee -a install-test.log | |
| "$INSTALL_DIR/cass" --help 2>&1 | head -20 | tee -a install-test.log | |
| # Run binary version | |
| echo "" | tee -a install-test.log | |
| echo "=== Binary --version output ===" | tee -a install-test.log | |
| "$INSTALL_DIR/cass" --version 2>&1 | tee -a install-test.log | |
| echo "" | tee -a install-test.log | |
| echo "=== All verification checks passed ===" | tee -a install-test.log | |
| - name: Output repro command on failure | |
| if: failure() | |
| run: | | |
| echo "=== REPRO COMMAND ===" | tee -a install-test.log | |
| echo "To reproduce this failure locally:" | tee -a install-test.log | |
| echo "" | tee -a install-test.log | |
| echo " cargo build --release" | tee -a install-test.log | |
| echo " mkdir -p /tmp/test-artifacts" | tee -a install-test.log | |
| echo " cp target/release/cass /tmp/test-artifacts/" | tee -a install-test.log | |
| echo " cd /tmp/test-artifacts && tar -czvf cass-vtest-linux-x86_64.tar.gz cass" | tee -a install-test.log | |
| echo " sha256sum cass-vtest-linux-x86_64.tar.gz > cass-vtest-linux-x86_64.tar.gz.sha256" | tee -a install-test.log | |
| echo " ARTIFACT_URL=file:///tmp/test-artifacts/cass-vtest-linux-x86_64.tar.gz \\" | tee -a install-test.log | |
| echo " CHECKSUM=\$(cat /tmp/test-artifacts/cass-vtest-linux-x86_64.tar.gz.sha256 | cut -d' ' -f1) \\" | tee -a install-test.log | |
| echo " RUSTUP_INIT_SKIP=1 \\" | tee -a install-test.log | |
| echo " bash install.sh --version vtest --easy-mode --verify --dest /tmp/cass-install" | tee -a install-test.log | |
| - name: Upload test logs | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: install-test-linux-logs | |
| path: install-test.log | |
| # Real install E2E test on macOS | |
| install-macos: | |
| name: Install Test (macOS) | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2 | |
| - name: Build release binary | |
| run: cargo build --release | |
| - name: Create test artifact | |
| run: | | |
| mkdir -p test-artifacts | |
| cp target/release/cass test-artifacts/ | |
| cd test-artifacts | |
| tar -czvf cass-vtest-macos-arm64.tar.gz cass | |
| shasum -a 256 cass-vtest-macos-arm64.tar.gz > cass-vtest-macos-arm64.tar.gz.sha256 | |
| echo "=== Test artifact created ===" | |
| ls -la | |
| cat cass-vtest-macos-arm64.tar.gz.sha256 | |
| - name: Run install.sh with real tooling | |
| id: install | |
| run: | | |
| set -euo pipefail | |
| INSTALL_DIR=$(mktemp -d) | |
| echo "install_dir=$INSTALL_DIR" >> $GITHUB_OUTPUT | |
| echo "=== Environment ===" | tee install-test.log | |
| echo "Rust version: $(rustc --version)" | tee -a install-test.log | |
| echo "Cargo version: $(cargo --version)" | tee -a install-test.log | |
| echo "Install dir: $INSTALL_DIR" | tee -a install-test.log | |
| echo "" | tee -a install-test.log | |
| ARTIFACT_PATH="$(pwd)/test-artifacts/cass-vtest-macos-arm64.tar.gz" | |
| CHECKSUM=$(cat test-artifacts/cass-vtest-macos-arm64.tar.gz.sha256 | cut -d' ' -f1) | |
| echo "=== Running install.sh ===" | tee -a install-test.log | |
| echo "ARTIFACT_URL: file://$ARTIFACT_PATH" | tee -a install-test.log | |
| echo "CHECKSUM: $CHECKSUM" | tee -a install-test.log | |
| echo "" | tee -a install-test.log | |
| ARTIFACT_URL="file://$ARTIFACT_PATH" \ | |
| CHECKSUM="$CHECKSUM" \ | |
| RUSTUP_INIT_SKIP=1 \ | |
| timeout 60 bash install.sh \ | |
| --version vtest \ | |
| --easy-mode \ | |
| --verify \ | |
| --dest "$INSTALL_DIR" \ | |
| 2>&1 | tee -a install-test.log | |
| echo "" | tee -a install-test.log | |
| echo "=== Install completed ===" | tee -a install-test.log | |
| - name: Verify installation | |
| run: | | |
| INSTALL_DIR="${{ steps.install.outputs.install_dir }}" | |
| echo "=== Verification ===" | tee -a install-test.log | |
| if [ ! -f "$INSTALL_DIR/cass" ]; then | |
| echo "ERROR: Binary not found at $INSTALL_DIR/cass" | tee -a install-test.log | |
| ls -la "$INSTALL_DIR" | tee -a install-test.log | |
| exit 1 | |
| fi | |
| echo "OK: Binary exists at $INSTALL_DIR/cass" | tee -a install-test.log | |
| if [ ! -x "$INSTALL_DIR/cass" ]; then | |
| echo "ERROR: Binary is not executable" | tee -a install-test.log | |
| exit 1 | |
| fi | |
| echo "OK: Binary is executable" | tee -a install-test.log | |
| echo "" | tee -a install-test.log | |
| echo "=== Binary --help output ===" | tee -a install-test.log | |
| "$INSTALL_DIR/cass" --help 2>&1 | head -20 | tee -a install-test.log | |
| echo "" | tee -a install-test.log | |
| echo "=== Binary --version output ===" | tee -a install-test.log | |
| "$INSTALL_DIR/cass" --version 2>&1 | tee -a install-test.log | |
| echo "" | tee -a install-test.log | |
| echo "=== All verification checks passed ===" | tee -a install-test.log | |
| - name: Output repro command on failure | |
| if: failure() | |
| run: | | |
| echo "=== REPRO COMMAND ===" | tee -a install-test.log | |
| echo "To reproduce this failure locally on macOS:" | tee -a install-test.log | |
| echo "" | tee -a install-test.log | |
| echo " cargo build --release" | tee -a install-test.log | |
| echo " mkdir -p /tmp/test-artifacts" | tee -a install-test.log | |
| echo " cp target/release/cass /tmp/test-artifacts/" | tee -a install-test.log | |
| echo " cd /tmp/test-artifacts && tar -czvf cass-vtest-macos-arm64.tar.gz cass" | tee -a install-test.log | |
| echo " shasum -a 256 cass-vtest-macos-arm64.tar.gz > cass-vtest-macos-arm64.tar.gz.sha256" | tee -a install-test.log | |
| echo " ARTIFACT_URL=file:///tmp/test-artifacts/cass-vtest-macos-arm64.tar.gz \\" | tee -a install-test.log | |
| echo " CHECKSUM=\$(cat /tmp/test-artifacts/cass-vtest-macos-arm64.tar.gz.sha256 | cut -d' ' -f1) \\" | tee -a install-test.log | |
| echo " RUSTUP_INIT_SKIP=1 \\" | tee -a install-test.log | |
| echo " bash install.sh --version vtest --easy-mode --verify --dest /tmp/cass-install" | tee -a install-test.log | |
| - name: Upload test logs | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: install-test-macos-logs | |
| path: install-test.log |