Skip to content

fix(ci): try macos-11 for Intel Mac to bypass 'not supported' error #25

fix(ci): try macos-11 for Intel Mac to bypass 'not supported' error

fix(ci): try macos-11 for Intel Mac to bypass 'not supported' error #25

name: One-Liner Installer Test
on:
workflow_dispatch:
inputs:
version:
description: "Version to test (e.g., v2.5.9)"
required: false
default: ""
push:
paths:
- "install.sh"
- "install.ps1"
- ".github/workflows/one-liner-test.yml"
pull_request:
paths:
- "install.sh"
- "install.ps1"
jobs:
test-installer:
name: Test on ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: "Linux (Ubuntu/Debian)"
os: ubuntu-latest
method: bash-sh
- name: "Linux (Fedora/Arch)"
os: ubuntu-latest
method: docker-fedora
- name: "macOS (Intel)"
os: macos-11
method: bash-sh
- name: "macOS (Apple Silicon)"
os: macos-latest
method: bash-sh
- name: "Windows (PowerShell)"
os: windows-latest
method: powershell-ps1
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Setup Rust (Fallback Build Test)
uses: dtolnay/rust-toolchain@stable
- name: Run Installer
shell: bash
env:
CORTEX_VERSION: ${{ github.event.inputs.version }}
run: |
case "${{ matrix.method }}" in
bash-sh)
echo "Testing via Bash installer..."
bash install.sh
;;
docker-fedora)
echo "Testing on Fedora via Docker (Distro Compatibility Check)..."
docker run --rm -v $(pwd):/workspace -w /workspace fedora:latest bash -c "
dnf install -y grep findutils curl python3.11 python3.11-libs &&
ln -sf /usr/bin/python3.11 /usr/bin/python3 &&
ldconfig &&
bash install.sh &&
export PATH=\$HOME/.local/bin:\$PATH &&
cortex --version &&
cortex init
"
;;
powershell-ps1)
echo "Testing via PowerShell installer..."
powershell -ExecutionPolicy Bypass -File install.ps1
;;
esac
- name: Verify Installation
if: matrix.method != 'docker-fedora'
shell: bash
run: |
if [ "${{ matrix.method }}" == "powershell-ps1" ]; then
# Windows verification needs powershell context if run via bash
powershell -Command "
\$env:Path += \";\$env:USERPROFILE\.local\bin\"
cortex --version
cortex init
"
else
# Ensure bin dir is in path for the rest of the job
export PATH="$HOME/.local/bin:$PATH"
echo "Checking version..."
cortex --version
echo "Checking init..."
cortex init
fi