Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(main): release 0.5.0 #23

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5358082
Add workflow to sync finch
vsiravar Mar 7, 2023
78a3f50
fix: print debug logs when lima disk command fails (#270)
davidhsingyuchen Mar 7, 2023
8faa7de
fix: print debug logs after newline (#273)
davidhsingyuchen Mar 8, 2023
e2d9232
ci: use the Go version in go.mod instead of a hard-coded one (#276)
davidhsingyuchen Mar 8, 2023
2516dc5
docs: make 'git pull' automatically update submodules (#274)
davidhsingyuchen Mar 8, 2023
14db6ec
ci: Add workflow to sync finch submodules (#271)
vsiravar Mar 9, 2023
d88b1fe
PR 1 with a new interface for testing reverting a PR
vsiravar Mar 10, 2023
25bcdb7
PR 2 which uses previoulsy created interface in PR1
vsiravar Mar 10, 2023
d4fd1f6
build(deps): Bump submodules (#281)
github-actions[bot] Mar 10, 2023
b9a94d8
test: Improve test coverage for additional disk feature (#280)
azhouwd Mar 10, 2023
370a9ef
ci: add sanity test for running multiple VM instances in release test…
AnqiPang Mar 11, 2023
f354449
ci: Add schedule to update-deps workflow (#292)
vsiravar Mar 14, 2023
d741a03
build(deps): bump github.com/onsi/ginkgo/v2 from 2.9.0 to 2.9.1 (#285)
dependabot[bot] Mar 15, 2023
dd626a0
build(deps): bump github.com/runfinch/common-tests from 0.6.1 to 0.6.…
dependabot[bot] Mar 16, 2023
0269743
build(deps): Bump lima version (#302)
github-actions[bot] Mar 17, 2023
b38af9f
build(deps): Bump submodules (#304)
github-actions[bot] Mar 17, 2023
a49ed58
Merge branch 'main' into vsiravar/test-pr-reverting
vsiravar Mar 19, 2023
e8d50bb
Merge pull request #22 from vsiravar/vsiravar/test-pr-reverting
vsiravar Mar 19, 2023
422fe74
chore(main): release 0.5.0
github-actions[bot] Mar 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/bin/update-os-image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -euxo pipefail
# Set OS hash directory in finch-core as base directory for searching latest OS images.
OS_BASE_IMAGE_HASH_DIR="./deps/finch-core/hashes/"

OS_AARCH64_FILENAME_PATTERN="Fedora-Cloud-Base-.*-.*.aarch64-.*.qcow2"

OS_X86_64_FILENAME_PATTERN="Fedora-Cloud-Base-.*-.*.x86_64-.*.qcow2"


# Use wildcard patterns to search for the two files and assign their paths to variables
AARCH64_FILEPATH=$(find "$OS_BASE_IMAGE_HASH_DIR" -name "Fedora-Cloud-Base-*-*.aarch64-*.qcow2.sha512" -print -quit)
X86_64_FILEPATH=$(find "$OS_BASE_IMAGE_HASH_DIR" -name "Fedora-Cloud-Base-*-*.x86_64-*.qcow2.sha512" -print -quit)

# Extract the file names without the path and remove the ".sha512" extension
AARCH64_OS_BASE_IMAGE=$(basename "$AARCH64_FILEPATH" .sha512)
X86_64_OS_BASE_IMAGE=$(basename "$X86_64_FILEPATH" .sha512)

echo "AARCH64 base image: ${AARCH64_OS_BASE_IMAGE}"
echo "X86_64 base image: ${X86_64_OS_BASE_IMAGE}"

# Replace occurrences of FINCH_OS_BASENAME in the Makefile with the file names
sed -E -i.bak 's|^([[:blank:]]*FINCH_OS_BASENAME[[:blank:]]*\?=[[:blank:]]*)('"${OS_AARCH64_FILENAME_PATTERN}"')|\1'"$AARCH64_OS_BASE_IMAGE"'|' Makefile
sed -E -i.bak 's|^([[:blank:]]*FINCH_OS_BASENAME[[:blank:]]*\?=[[:blank:]]*)('"${OS_X86_64_FILENAME_PATTERN}"')|\1'"$X86_64_OS_BASE_IMAGE"'|' Makefile
61 changes: 60 additions & 1 deletion .github/workflows/release-homebrew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ env.FINCH_TAG }}
fetch-depth: 0
persist-credentials: false
submodules: true
- name: Clean up previous files
run: |
sudo rm -rf /opt/finch
Expand All @@ -85,8 +88,36 @@ jobs:
brew bump-cask-pr --write-only -f --version=$FINCH_VERSION finch
- name: Silently install
run: |
export HOMEBREW_NO_INSTALL_FROM_API=1
cd $(brew --repo homebrew/cask)
brew install --cask ./Casks/finch.rb
- name: Build project
run: |
brew install go lz4 automake autoconf libtool
export PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH"
make
- name: Multiple instances of Finch test
run: |
# start two Finch VM instances
./_output/bin/finch vm init
finch vm init
# start a container in each VM instance
./_output/bin/finch pull alpine
finch pull alpine
./_output/bin/finch run --name test-ctr1 alpine
finch run --name test-ctr2 alpine
# clean up the VMs
./_output/bin/finch vm stop && ./_output/bin/finch vm remove
finch vm stop && finch vm remove
- name: Clean up multiple instance test
run: |
sudo rm -rf ./_output
export HOMEBREW_NO_INSTALL_FROM_API=1
cd $(brew --repo homebrew/cask)
# Need to reinstall because there were errors on arm64 11.7 and arm64 12.6 hosts after running multiple instances tests,
# that caused the VM initialization failure in the e2e test.
# Example workflow run https://github.com/runfinch/finch/actions/runs/4367457552/jobs/7638794529
brew reinstall --cask ./Casks/finch.rb
- name: Run e2e tests
run: INSTALLED=true make test-e2e
- name: Silently uninstall
Expand Down Expand Up @@ -124,6 +155,9 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ env.FINCH_TAG }}
fetch-depth: 0
persist-credentials: false
submodules: true
- name: Clean up previous files
run: |
sudo rm -rf /opt/finch
Expand All @@ -148,8 +182,33 @@ jobs:
brew bump-cask-pr --write-only -f --version=$FINCH_VERSION finch
- name: Silently install
run: |
export HOMEBREW_NO_INSTALL_FROM_API=1
cd $(brew --repo homebrew/cask)
brew install --cask ./Casks/finch.rb
- name: Build project
run: |
brew install go lz4 automake autoconf libtool
export PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH"
make
- name: Multiple instances of Finch test
run: |
# start two Finch VM instances
./_output/bin/finch vm init
finch vm init
# start a container in each VM instance
./_output/bin/finch pull alpine
finch pull alpine
./_output/bin/finch run --name test-ctr1 alpine
finch run --name test-ctr2 alpine
# clean up the VMs
./_output/bin/finch vm stop && ./_output/bin/finch vm remove
finch vm stop && finch vm remove
- name: Clean up multiple instance test
run: |
sudo rm -rf ./_output
export HOMEBREW_NO_INSTALL_FROM_API=1
cd $(brew --repo homebrew/cask)
brew reinstall --cask ./Casks/finch.rb
- name: Run e2e tests
run: INSTALLED=true make test-e2e
- name: Silently uninstall
Expand All @@ -161,7 +220,7 @@ jobs:
echo ERROR: Finch is not uninstalled
exit 1
fi

pr-to-homebrew:
needs: [get-latest-tag, macos-arm64-test-installer, macos-amd64-test-installer]
runs-on: macos-latest
Expand Down
91 changes: 87 additions & 4 deletions .github/workflows/release-installer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,20 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.x
- uses: actions/checkout@v3
go-version-file: go.mod
cache: true
- name: Checkout the tag
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
fetch-depth: 0
persist-credentials: false
submodules: true
- name: Clean up previous files
run: |
sudo rm -rf /opt/finch
sudo rm -rf ~/.finch
sudo rm -rf ./_output
if pgrep '^qemu-system'; then
sudo pkill '^qemu-system'
fi
Expand All @@ -64,6 +72,41 @@ jobs:
aws s3 cp s3://${{ secrets.INSTALLER_PRIVATE_BUCKET_NAME }}/Finch-${GITHUB_REF_NAME}-aarch64.pkg Finch-${GITHUB_REF_NAME}-aarch64.pkg
- name: Silently install
run: sudo installer -pkg Finch-${GITHUB_REF_NAME}-aarch64.pkg -target /
- name: Build project
run: |
brew install go lz4 automake autoconf libtool
export PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH"
make
- name: Multiple instances of Finch test
run: |
# start two Finch VM instances
./_output/bin/finch vm init
finch vm init
# start a container in each VM instance
./_output/bin/finch pull alpine
finch pull alpine
./_output/bin/finch run --name test-ctr1 alpine
finch run --name test-ctr2 alpine
# check whether containers exist
if ! ./_output/bin/finch ps -a | grep 'test-ctr1'; then
echo "ERROR: The container test-ctr1 doesn't exist"
exit 1
fi
if ! finch ps -a | grep 'test-ctr2'; then
echo "ERROR: The container test-ctr2 doesn't exist"
exit 1
fi
# clean up the VMs
./_output/bin/finch vm stop && ./_output/bin/finch vm remove
finch vm stop && finch vm remove
- name: Clean up multiple instance test
run: |
sudo rm -rf ./_output
echo 'y' | sudo bash /Applications/Finch/uninstall.sh
# Need to reinstall because there were errors on arm64 11.7 and arm64 12.6 hosts after running multiple instances tests,
# that caused the VM initialization failure in the e2e test.
# Example workflow run https://github.com/runfinch/finch/actions/runs/4367457552/jobs/7638794529
sudo installer -pkg Finch-${GITHUB_REF_NAME}-aarch64.pkg -target /
- name: Run e2e tests
run: INSTALLED=true make test-e2e
- name: Silently uninstall
Expand All @@ -88,12 +131,20 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.x
- uses: actions/checkout@v3
go-version-file: go.mod
cache: true
- name: Checkout the tag
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
fetch-depth: 0
persist-credentials: false
submodules: true
- name: Clean up previous files
run: |
sudo rm -rf /opt/finch
sudo rm -rf ~/.finch
sudo rm -rf ./_output
if pgrep '^qemu-system'; then
sudo pkill '^qemu-system'
fi
Expand All @@ -112,6 +163,38 @@ jobs:
- name: Silently install
run: |
sudo installer -pkg Finch-${GITHUB_REF_NAME}-x86_64.pkg -target /
- name: Build project
run: |
brew install go lz4 automake autoconf libtool
export PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH"
make
- name: Multiple instances of Finch test
run: |
# start two Finch VM instances
./_output/bin/finch vm init
finch vm init
# start a container in each VM instance
./_output/bin/finch pull alpine
finch pull alpine
./_output/bin/finch run --name test-ctr1 alpine
finch run --name test-ctr2 alpine
# check whether containers exist
if ! ./_output/bin/finch ps -a | grep 'test-ctr1'; then
echo "ERROR: The container test-ctr1 doesn't exist"
exit 1
fi
if ! finch ps -a | grep 'test-ctr2'; then
echo "ERROR: The container test-ctr2 doesn't exist"
exit 1
fi
# clean up the VMs
./_output/bin/finch vm stop && ./_output/bin/finch vm remove
finch vm stop && finch vm remove
- name: Clean up multiple instance test
run: |
sudo rm -rf ./_output
echo 'y' | sudo bash /Applications/Finch/uninstall.sh
sudo installer -pkg Finch-${GITHUB_REF_NAME}-x86_64.pkg -target /
- name: Run e2e tests
run: INSTALLED=true make test-e2e
- name: Silently uninstall
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/sync-submodules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Sync Submodules

# Pulls changes from the main branch of submodules daily at 9:00 UTC and opens a PR.
on:
schedule:
- cron: '0 9 * * *'
workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update sub modules
run: |
git submodule update --remote
./.github/bin/update-os-image.sh
- name: Create PR
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
signoff: true
title: 'build(deps): Bump submodules'
2 changes: 2 additions & 0 deletions .github/workflows/update-deps.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Update dependencies
on:
schedule:
- cron: '0 11 * * 2'
workflow_dispatch:

permissions:
Expand Down
Loading