|
1 | | -name: Finch VM |
2 | | -on: |
3 | | - push: |
4 | | - branches: |
5 | | - - main |
6 | | - paths-ignore: |
7 | | - - '**.md' |
8 | | - pull_request: |
9 | | - branches: |
10 | | - - main |
11 | | - paths-ignore: |
12 | | - - '**.md' |
13 | | - workflow_dispatch: |
14 | | -env: |
15 | | - GO_VERSION: '1.24.11' |
16 | | -jobs: |
17 | | - mac-test-e2e: |
18 | | - runs-on: codebuild-finch-daemon-arm64-2-instance-${{ github.run_id }}-${{ github.run_attempt }} |
19 | | - steps: |
20 | | - - name: Configure Git for ec2-user |
21 | | - run: | |
22 | | - git config --global --add safe.directory "*" |
23 | | - shell: bash |
| 1 | +# name: Finch VM |
| 2 | +# on: |
| 3 | +# push: |
| 4 | +# branches: |
| 5 | +# - main |
| 6 | +# paths-ignore: |
| 7 | +# - '**.md' |
| 8 | +# pull_request: |
| 9 | +# branches: |
| 10 | +# - main |
| 11 | +# paths-ignore: |
| 12 | +# - '**.md' |
| 13 | +# workflow_dispatch: |
| 14 | +# env: |
| 15 | +# GO_VERSION: '1.24.11' |
| 16 | +# jobs: |
| 17 | +# mac-test-e2e: |
| 18 | +# runs-on: codebuild-finch-daemon-arm64-2-instance-${{ github.run_id }}-${{ github.run_attempt }} |
| 19 | +# steps: |
| 20 | +# - name: Configure Git for ec2-user |
| 21 | +# run: | |
| 22 | +# git config --global --add safe.directory "*" |
| 23 | +# shell: bash |
24 | 24 |
|
25 | | - - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 |
26 | | - with: |
27 | | - go-version: ${{ env.GO_VERSION }} |
28 | | - cache: false |
| 25 | +# - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 |
| 26 | +# with: |
| 27 | +# go-version: ${{ env.GO_VERSION }} |
| 28 | +# cache: false |
29 | 29 |
|
30 | | - - name: Configure Go for ec2-user |
31 | | - run: | |
32 | | - # Ensure Go is properly configured for ec2-user |
33 | | - chown -R ec2-user:staff $GOPATH || true |
34 | | - chown -R ec2-user:staff $RUNNER_TOOL_CACHE/go || true |
| 30 | +# - name: Configure Go for ec2-user |
| 31 | +# run: | |
| 32 | +# # Ensure Go is properly configured for ec2-user |
| 33 | +# chown -R ec2-user:staff $GOPATH || true |
| 34 | +# chown -R ec2-user:staff $RUNNER_TOOL_CACHE/go || true |
35 | 35 |
|
36 | | - - name: Install Rosetta 2 |
37 | | - run: su ec2-user -c 'echo "A" | /usr/sbin/softwareupdate --install-rosetta --agree-to-license || true' |
| 36 | +# - name: Install Rosetta 2 |
| 37 | +# run: su ec2-user -c 'echo "A" | /usr/sbin/softwareupdate --install-rosetta --agree-to-license || true' |
38 | 38 |
|
39 | | - - name: Configure Homebrew for ec2-user |
40 | | - run: | |
41 | | - echo "Creating .brewrc file for ec2-user..." |
42 | | - cat > /Users/ec2-user/.brewrc << 'EOF' |
43 | | - # Homebrew environment setup |
44 | | - export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" |
45 | | - export HOMEBREW_PREFIX="/opt/homebrew" |
46 | | - export HOMEBREW_CELLAR="/opt/homebrew/Cellar" |
47 | | - export HOMEBREW_REPOSITORY="/opt/homebrew" |
48 | | - export HOMEBREW_NO_AUTO_UPDATE=1 |
49 | | - EOF |
50 | | - chown ec2-user:staff /Users/ec2-user/.brewrc |
| 39 | +# - name: Configure Homebrew for ec2-user |
| 40 | +# run: | |
| 41 | +# echo "Creating .brewrc file for ec2-user..." |
| 42 | +# cat > /Users/ec2-user/.brewrc << 'EOF' |
| 43 | +# # Homebrew environment setup |
| 44 | +# export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" |
| 45 | +# export HOMEBREW_PREFIX="/opt/homebrew" |
| 46 | +# export HOMEBREW_CELLAR="/opt/homebrew/Cellar" |
| 47 | +# export HOMEBREW_REPOSITORY="/opt/homebrew" |
| 48 | +# export HOMEBREW_NO_AUTO_UPDATE=1 |
| 49 | +# EOF |
| 50 | +# chown ec2-user:staff /Users/ec2-user/.brewrc |
51 | 51 |
|
52 | | - # Fix Homebrew permissions |
53 | | - echo "Setting permissions for Homebrew directories..." |
54 | | - mkdir -p /opt/homebrew/Cellar |
55 | | - chown -R ec2-user:staff /opt/homebrew |
56 | | - shell: bash |
| 52 | +# # Fix Homebrew permissions |
| 53 | +# echo "Setting permissions for Homebrew directories..." |
| 54 | +# mkdir -p /opt/homebrew/Cellar |
| 55 | +# chown -R ec2-user:staff /opt/homebrew |
| 56 | +# shell: bash |
57 | 57 |
|
58 | | - # Install dependencies using ec2-user with custom environment |
59 | | - - name: Install dependencies |
60 | | - run: | |
61 | | - echo "Installing dependencies as ec2-user..." |
62 | | - # Run brew with custom environment |
63 | | - su ec2-user -c 'source /Users/ec2-user/.brewrc && brew install lz4 automake autoconf libtool yq' |
64 | | - shell: bash |
| 58 | +# # Install dependencies using ec2-user with custom environment |
| 59 | +# - name: Install dependencies |
| 60 | +# run: | |
| 61 | +# echo "Installing dependencies as ec2-user..." |
| 62 | +# # Run brew with custom environment |
| 63 | +# su ec2-user -c 'source /Users/ec2-user/.brewrc && brew install lz4 automake autoconf libtool yq' |
| 64 | +# shell: bash |
65 | 65 |
|
66 | | - - name: Checkout mainline finch repo |
67 | | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
68 | | - with: |
69 | | - # TODO: revert to main |
70 | | - ref: updated-finch-core-nerdctl |
71 | | - repository: runfinch/finch |
72 | | - fetch-depth: 0 |
73 | | - persist-credentials: false |
74 | | - submodules: recursive |
| 66 | +# - name: Checkout mainline finch repo |
| 67 | +# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 68 | +# with: |
| 69 | +# # TODO: revert to main |
| 70 | +# ref: updated-finch-core-nerdctl |
| 71 | +# repository: runfinch/finch |
| 72 | +# fetch-depth: 0 |
| 73 | +# persist-credentials: false |
| 74 | +# submodules: recursive |
75 | 75 |
|
76 | | - - name: Checkout finch-daemon PR |
77 | | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
78 | | - with: |
79 | | - ref: ${{ github.event.pull_request.head.sha || 'main' }} |
80 | | - repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} |
81 | | - fetch-depth: 0 |
82 | | - persist-credentials: false |
83 | | - submodules: recursive |
84 | | - path: finch-daemon-pr |
| 76 | +# - name: Checkout finch-daemon PR |
| 77 | +# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 78 | +# with: |
| 79 | +# ref: ${{ github.event.pull_request.head.sha || 'main' }} |
| 80 | +# repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} |
| 81 | +# fetch-depth: 0 |
| 82 | +# persist-credentials: false |
| 83 | +# submodules: recursive |
| 84 | +# path: finch-daemon-pr |
85 | 85 |
|
86 | | - - name: Clean macOS runner workspace |
87 | | - run: | |
88 | | - # taken from test-pkg workflow in finch |
89 | | - sudo rm -rf /Applications/Finch |
90 | | - sudo rm -rf /opt/finch |
91 | | - su ec2-user -c 'rm -rf ~/.finch' |
92 | | - sudo rm -rf ./_output |
93 | | - if pgrep '^qemu-system'; then |
94 | | - sudo pkill '^qemu-system' |
95 | | - fi |
96 | | - if pgrep '^socket_vmnet'; then |
97 | | - sudo pkill '^socket_vmnet' |
98 | | - fi |
| 86 | +# - name: Clean macOS runner workspace |
| 87 | +# run: | |
| 88 | +# # taken from test-pkg workflow in finch |
| 89 | +# sudo rm -rf /Applications/Finch |
| 90 | +# sudo rm -rf /opt/finch |
| 91 | +# su ec2-user -c 'rm -rf ~/.finch' |
| 92 | +# sudo rm -rf ./_output |
| 93 | +# if pgrep '^qemu-system'; then |
| 94 | +# sudo pkill '^qemu-system' |
| 95 | +# fi |
| 96 | +# if pgrep '^socket_vmnet'; then |
| 97 | +# sudo pkill '^socket_vmnet' |
| 98 | +# fi |
99 | 99 |
|
100 | | - - name: Make & install Finch |
101 | | - run: | |
102 | | - chown -R ec2-user:staff "$GITHUB_WORKSPACE" |
103 | | - su ec2-user -c "cd $GITHUB_WORKSPACE && make clean && make FINCH_OS_IMAGE_LOCATION_ROOT=/Applications/Finch && make install PREFIX=Applications/Finch" |
104 | | - su ec2-user -c "ls -lah /Applications/Finch" |
| 100 | +# - name: Make & install Finch |
| 101 | +# run: | |
| 102 | +# chown -R ec2-user:staff "$GITHUB_WORKSPACE" |
| 103 | +# su ec2-user -c "cd $GITHUB_WORKSPACE && make clean && make FINCH_OS_IMAGE_LOCATION_ROOT=/Applications/Finch && make install PREFIX=Applications/Finch" |
| 104 | +# su ec2-user -c "ls -lah /Applications/Finch" |
105 | 105 |
|
106 | | - - name: Make Finch Daemon |
107 | | - run: | |
108 | | - su ec2-user -c "cd $GITHUB_WORKSPACE/finch-daemon-pr && STATIC=1 GOPROXY=direct GOOS=linux GOARCH=\$(go env GOARCH) make" |
109 | | - su ec2-user -c "cp $GITHUB_WORKSPACE/finch-daemon-pr/bin/finch-daemon /Applications/Finch/finch-daemon/finch-daemon" |
| 106 | +# - name: Make Finch Daemon |
| 107 | +# run: | |
| 108 | +# su ec2-user -c "cd $GITHUB_WORKSPACE/finch-daemon-pr && STATIC=1 GOPROXY=direct GOOS=linux GOARCH=\$(go env GOARCH) make" |
| 109 | +# su ec2-user -c "cp $GITHUB_WORKSPACE/finch-daemon-pr/bin/finch-daemon /Applications/Finch/finch-daemon/finch-daemon" |
110 | 110 |
|
111 | | - - name: Initializing Finch VM |
112 | | - run: | |
113 | | - su ec2-user -c 'finch vm init' |
114 | | - su ec2-user -c 'while ! finch vm status | grep -q "Running"; do echo "Waiting for VM..."; sleep 5; done' |
| 111 | +# - name: Initializing Finch VM |
| 112 | +# run: | |
| 113 | +# su ec2-user -c 'finch vm init' |
| 114 | +# su ec2-user -c 'while ! finch vm status | grep -q "Running"; do echo "Waiting for VM..."; sleep 5; done' |
115 | 115 |
|
116 | | - - name: Pinging Finch Daemon socket |
117 | | - run: | |
118 | | - su ec2-user -c 'LIMA_HOME=/Applications/Finch/lima/data /Applications/Finch/lima/bin/limactl shell finch curl --unix-socket /var/run/finch.sock -X GET http:/v1.41/version' |
| 116 | +# - name: Pinging Finch Daemon socket |
| 117 | +# run: | |
| 118 | +# su ec2-user -c 'LIMA_HOME=/Applications/Finch/lima/data /Applications/Finch/lima/bin/limactl shell finch curl --unix-socket /var/run/finch.sock -X GET http:/v1.41/version' |
119 | 119 |
|
120 | | - # Run e2e tests |
121 | | - - name: Run e2e tests |
122 | | - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 |
123 | | - with: |
124 | | - timeout_minutes: 120 |
125 | | - max_attempts: 3 |
126 | | - command: | |
127 | | - echo "Running e2e tests..." |
128 | | - su ec2-user -c 'cd ${{ github.workspace }}/finch-daemon-pr && make test-e2e-inside-vm' |
| 120 | +# # Run e2e tests |
| 121 | +# - name: Run e2e tests |
| 122 | +# uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 |
| 123 | +# with: |
| 124 | +# timeout_minutes: 120 |
| 125 | +# max_attempts: 3 |
| 126 | +# command: | |
| 127 | +# echo "Running e2e tests..." |
| 128 | +# su ec2-user -c 'cd ${{ github.workspace }}/finch-daemon-pr && make test-e2e-inside-vm' |
129 | 129 |
|
130 | | - - name: Stop & remove Finch VM |
131 | | - run: | |
132 | | - echo "Stopping Finch VM as ec2-user..." |
133 | | - # Stop VM using ec2-user with custom environment |
134 | | - su ec2-user -c "source /Users/ec2-user/.brewrc && HOME=/Users/ec2-user finch vm remove -f" |
135 | | - shell: bash |
136 | | - if: always() |
| 130 | +# - name: Stop & remove Finch VM |
| 131 | +# run: | |
| 132 | +# echo "Stopping Finch VM as ec2-user..." |
| 133 | +# # Stop VM using ec2-user with custom environment |
| 134 | +# su ec2-user -c "source /Users/ec2-user/.brewrc && HOME=/Users/ec2-user finch vm remove -f" |
| 135 | +# shell: bash |
| 136 | +# if: always() |
0 commit comments