Skip to content

Commit cf54a12

Browse files
committed
fix: add macOS support to installation test
1 parent dedc897 commit cf54a12

File tree

1 file changed

+45
-3
lines changed

1 file changed

+45
-3
lines changed

.github/workflows/test-install.yml

+45-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@ on:
77
workflow_dispatch: {}
88

99
jobs:
10-
test-linux-install:
11-
name: Test Linux Installation
12-
runs-on: ubuntu-latest
10+
test-unix-install:
11+
name: Test Unix Installation
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest]
15+
include:
16+
- os: ubuntu-latest
17+
target: x86_64-unknown-linux-gnu
18+
- os: macos-latest
19+
target: x86_64-apple-darwin
20+
runs-on: ${{ matrix.os }}
1321
steps:
1422
- uses: actions/checkout@v3
1523

@@ -29,6 +37,40 @@ jobs:
2937
script="${script//$'\r'/'%0D'}"
3038
echo "script=$script" >> $GITHUB_OUTPUT
3139
40+
- name: Install Rust
41+
uses: dtolnay/rust-toolchain@stable
42+
with:
43+
targets: ${{ matrix.target }}
44+
45+
- name: Build yek
46+
shell: bash
47+
run: |
48+
cargo build --release --target ${{ matrix.target }} --locked
49+
# Verify binary exists
50+
binary="target/${{ matrix.target }}/release/yek"
51+
if [ ! -f "$binary" ]; then
52+
echo "Error: Binary not found at: $binary"
53+
find target -name "yek" -o -name "yek.exe"
54+
exit 1
55+
fi
56+
ls -l "$binary"
57+
58+
- name: Setup test environment
59+
shell: bash
60+
run: |
61+
# Create test directory
62+
sudo mkdir -p /usr/local/bin
63+
# Copy binary
64+
sudo cp "target/${{ matrix.target }}/release/yek" /usr/local/bin/
65+
# Make executable
66+
sudo chmod +x /usr/local/bin/yek
67+
# Verify binary is executable
68+
if ! which yek; then
69+
echo "Error: yek not found in PATH after manual installation"
70+
echo "PATH: $PATH"
71+
exit 1
72+
fi
73+
3274
- name: Test installation script
3375
run: ${{ steps.get_linux_install_script.outputs.script }}
3476

0 commit comments

Comments
 (0)