Skip to content

Commit 4e5d828

Browse files
ChandruShettyahsan-z-khanazhouwdAnqiPangdavidhsingyuchen
committed
Initial commit
Co-authored-by: Ahsan Khan <[email protected]> Co-authored-by: Ang Zhou <[email protected]> Co-authored-by: Anqi Pang <[email protected]> Co-authored-by: Hsing-Yu Chen <[email protected]> Co-authored-by: Justin Alvarez <[email protected]> Co-authored-by: Kevin Li <[email protected]> Co-authored-by: Monirul Islam <[email protected]> Co-authored-by: Mrudul Harwani <[email protected]> Co-authored-by: Sam Berning <[email protected]> Co-authored-by: Vishwas Siravara <[email protected]> Co-authored-by: Weike Qu <[email protected]> Co-authored-by: Ziwen Ning <[email protected]>
0 parents  commit 4e5d828

27 files changed

+1131
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug to help improve Finch Core
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
Briefly describe the probem you are having.
12+
13+
14+
**Steps to reproduce**
15+
A clear, step-by-step set of instructions to reproduce the bug.
16+
17+
18+
**Expected behavior**
19+
Description of what you expected to happen.
20+
21+
22+
**Screenshots or logs**
23+
If applicable, add screenshots or logs to help explain your problem.
24+
25+
26+
27+
**Additional context**
28+
Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature to add in Finch Core
4+
title: ''
5+
labels: 'feature'
6+
assignees: ''
7+
8+
---
9+
10+
**What is the problem you're trying to solve?**
11+
A clear and concise description of the use case for this feature. Please provide an example, if possible.
12+
13+
14+
**Describe the feature you'd like**
15+
A clear and concise description of what you'd like to happen.
16+
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Issue #, if available:
2+
3+
*Description of changes:*
4+
5+
6+
*Testing done:*
7+
8+
9+
- [ ] I've reviewed the guidance in CONTRIBUTING.md
10+
11+
12+
#### License Acceptance
13+
14+
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

.github/workflows/lint-pr-title.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "Lint PR Title"
2+
3+
on:
4+
# TODO: Change to pull_request_target after the repo is public.
5+
pull_request:
6+
types:
7+
- opened
8+
- edited
9+
- reopened
10+
- synchronize
11+
12+
jobs:
13+
main:
14+
name: conventional-commit
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: amannn/action-semantic-pull-request@v5
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-please.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
name: release-please
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: google-github-actions/release-please-action@v3
11+
with:
12+
release-type: go
13+
package-name: finch
14+
# Before we are at v1.0.0
15+
bump-minor-pre-major: true
16+

.github/workflows/release.yaml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Build
2+
3+
on:
4+
workflow_dispatch:
5+
env:
6+
GO111MODULE: on
7+
8+
permissions:
9+
# This is required for configure-aws-credentials to request an OIDC JWT ID token to access AWS resources later on.
10+
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
11+
id-token: write
12+
contents: read # This is required for actions/checkout
13+
14+
jobs:
15+
macos-arm64-build:
16+
runs-on: ['self-hosted', 'macos', 'arm64', '11.7']
17+
timeout-minutes: 60
18+
steps:
19+
- uses: actions/setup-go@v2
20+
with:
21+
go-version: 1.19.x
22+
- uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 1
25+
submodules: recursive
26+
persist-credentials: false
27+
28+
- name: Install dependencies
29+
# QEMU: required by Lima itself
30+
# bash: required by test-example.sh (OS version of bash is too old)
31+
# coreutils: required by test-example.sh for the "timeout" command
32+
# autoconf: required for building vde
33+
# automake: required for building vde
34+
# FileMonitor: required to capture opened files by limactl and qemu-
35+
36+
run: |
37+
brew update
38+
brew install qemu bash coreutils
39+
brew install autoconf automake
40+
brew install cpanm
41+
brew upgrade
42+
sudo cpanm install JSON
43+
curl -OL https://bitbucket.org/objective-see/deploy/downloads/FileMonitor_1.3.0.zip
44+
rm -rf /Applications/FileMonitor.app
45+
unzip FileMonitor_1.3.0.zip -d /Applications
46+
47+
- name: Make and release deps
48+
run: make install-deps
49+
- name: Upload MacOS build
50+
uses: actions/upload-artifact@v2
51+
with:
52+
name: lima-and-qemu.macos-arm64
53+
path: ./src/lima/lima-and-qemu.macos*
54+
if-no-files-found: error
55+
56+
macos-x86-build:
57+
runs-on: ['self-hosted', 'macos', 'amd64', '11.7']
58+
timeout-minutes: 60
59+
steps:
60+
- uses: actions/setup-go@v2
61+
with:
62+
go-version: 1.19.x
63+
- uses: actions/checkout@v2
64+
with:
65+
fetch-depth: 1
66+
submodules: recursive
67+
persist-credentials: false
68+
69+
- name: Install dependencies
70+
# QEMU: required by Lima itself
71+
# bash: required by test-example.sh (OS version of bash is too old)
72+
# coreutils: required by test-example.sh for the "timeout" command
73+
# autoconf: required for building vde
74+
# automake: required for building vde
75+
# FileMonitor: required to capture opened files by limactl and qemu-
76+
77+
run: |
78+
brew update
79+
brew install qemu bash coreutils
80+
brew install autoconf automake
81+
brew install cpanm
82+
brew upgrade
83+
sudo cpanm install JSON
84+
curl -OL https://bitbucket.org/objective-see/deploy/downloads/FileMonitor_1.3.0.zip
85+
rm -rf /Applications/FileMonitor.app
86+
unzip FileMonitor_1.3.0.zip -d /Applications
87+
88+
- name: Make and release deps
89+
run: make install-deps
90+
- name: Upload MacOS build
91+
uses: actions/upload-artifact@v2
92+
with:
93+
name: lima-and-qemu.macos-x86
94+
path: ./src/lima/lima-and-qemu.macos*
95+
if-no-files-found: error
96+
97+
release:
98+
runs-on: ubuntu-latest
99+
timeout-minutes: 5
100+
needs:
101+
- macos-x86-build
102+
- macos-arm64-build
103+
steps:
104+
- uses: actions/checkout@v2
105+
with:
106+
fetch-depth: 1
107+
persist-credentials: false
108+
109+
- name: configure aws credentials
110+
uses: aws-actions/configure-aws-credentials@v1
111+
with:
112+
role-to-assume: ${{ secrets.ROLE }}
113+
role-session-name: dependency-upload-session
114+
aws-region: ${{ secrets.REGION }}
115+
116+
- name: Download MacOS ARM64 build
117+
uses: actions/download-artifact@v2
118+
with:
119+
name: lima-and-qemu.macos-arm64
120+
path: build
121+
- name: Download MacOS x86_64 build
122+
uses: actions/download-artifact@v2
123+
with:
124+
name: lima-and-qemu.macos-x86
125+
path: build
126+
- name: "Upload to S3"
127+
run: |
128+
aws s3 cp ./build/ s3://${{ secrets.DEPENDENCY_BUCKET_NAME }}/aarch64/ --recursive --exclude "*" --include "lima-and-qemu.macos-aarch64*"
129+
aws s3 cp ./build/ s3://${{ secrets.DEPENDENCY_BUCKET_NAME }}/x86-64/ --recursive --exclude "*" --include "lima-and-qemu.macos-x86_64*"
130+
131+

.github/workflows/submodulesync.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Sync Submodules
2+
3+
on:
4+
workflow_dispatch:
5+
jobs:
6+
update:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v3
11+
with:
12+
submodules: recursive
13+
token: ${{ secrets.GITHUB_TOKEN }}
14+
- name: Update sub modules
15+
run: git submodule update --remote
16+
- name: Create PR
17+
uses: peter-evans/create-pull-request@v4
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
commit-message: bump submodules
21+
title: '[Automated] Bump submodules'

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
_output/
2+
downloads/
3+
*.idea
4+
*.DS_Store
5+
*.bak
6+
**/*.tar.gz
7+
.vscode/
8+
**/node_modules

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "src/lima"]
2+
path = src/lima
3+
url = https://github.com/lima-vm/lima
4+
[submodule "src/socket_vmnet"]
5+
path = src/socket_vmnet
6+
url = https://github.com/lima-vm/socket_vmnet

0 commit comments

Comments
 (0)