ci: 💚 upload binaries in ci, download apple silicon
This commit is contained in:
parent
b2d81516cd
commit
69d433ac03
4 changed files with 99 additions and 2 deletions
25
.github/workflows/README.md
vendored
Normal file
25
.github/workflows/README.md
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Deployment Process
|
||||
|
||||
## preview
|
||||
When merging to `preview`:
|
||||
- on each platform, a PyInstaller binary is built and placed in the extension directory. Then the extension is built and tested and uploaded as an artifact.
|
||||
- all of the artifacts are downloaded (and the Apple Silicon downloaded from S3 bucket) and pushed to the store/registry all at once, as pre-releases.
|
||||
- the version is bumped and this change is commited to preview
|
||||
|
||||
# main
|
||||
When merging to `main`:
|
||||
|
||||
> Make sure to sh build.sh m1 and push to the S3 bucket before merging to main, so that the newest Apple Silicon binary is available to package with the extension.
|
||||
|
||||
- the continuedev package is built and uploaded to PyPI. Then the version is bumped and this change is commited to main.
|
||||
- on each platform, a PyInstaller binary is built and placed in the extension directory. Then the extension is built and tested and uploaded as an artifact. The PyInstaller binary is also uploaded as an artifact.
|
||||
- all of the artifacts are downloaded (and the Apple Silicon downloaded from S3 bucket) and pushed to the store/registry all at once, as full releases.
|
||||
- the version is bumped and this change is commited to main
|
||||
- at the end, all of the PyInstaller binaries are uploaded to the S3 bucket because they are needed for JetBrains still.
|
||||
- in the future, the Intellij extension will be built and uploaded to the marketplace here
|
||||
|
||||
|
||||
TODO:
|
||||
- Don't download the Apple Silicon binary from VS Code extension
|
||||
- Download the Apple Silicon binary from S3 bucket
|
||||
- Upload all of the PyInstaller binaries to S3 bucket (but only on main. Just make the change on preview so that they are artifacts and add the step but don't run it on preview)
|
||||
73
.github/workflows/preview.yaml
vendored
73
.github/workflows/preview.yaml
vendored
|
|
@ -72,6 +72,12 @@ jobs:
|
|||
run: |
|
||||
chmod 777 dist/run
|
||||
|
||||
# 1.25 Upload the binary as an artifact
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.os }}Binary
|
||||
path: extension/exe/run
|
||||
|
||||
# 1.5 Place the binary in extension/exe directory
|
||||
- name: Make sure extension/exe directory exists
|
||||
run: |
|
||||
|
|
@ -87,6 +93,24 @@ jobs:
|
|||
cp dist/run.exe extension/exe/run.exe
|
||||
if: matrix.os == 'windows-latest'
|
||||
|
||||
# 1.75 If on Apple Silicon, download the binary from S3 bucket, using official S3 download action
|
||||
- name: Remove other binary
|
||||
if: matrix.os == 'macos-latest' && matrix.arch == 'arm64'
|
||||
run: |
|
||||
rm extension/exe/run
|
||||
|
||||
- name: Download Apple Silicon Binary
|
||||
if: matrix.os == 'macos-latest' && matrix.arch == 'arm64'
|
||||
uses: keithweaver/aws-s3-github-action@v1.0.0
|
||||
with:
|
||||
command: cp
|
||||
source: s3://s3.continue.dev/apple-silicon/run
|
||||
destination: extension/exe/run
|
||||
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws_region: us-west-1
|
||||
flags: --recursive
|
||||
|
||||
# 2. Install npm dependencies
|
||||
- name: Use Node.js 19.0.0
|
||||
uses: actions/setup-node@v3
|
||||
|
|
@ -215,3 +239,52 @@ jobs:
|
|||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.ref }}
|
||||
|
||||
# 5. Download binaries and upload to S3
|
||||
- name: Download Linux build
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: LinuxBinary
|
||||
path: exe/linux
|
||||
|
||||
- name: Download macOS build
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: macOSBinary
|
||||
path: exe/mac
|
||||
|
||||
- name: Download Windows build
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: WindowsBinary
|
||||
path: exe/windows
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-west-1
|
||||
|
||||
- name: Upload binaries to S3 (continue-server-binaries)
|
||||
uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks
|
||||
env:
|
||||
AWS_S3_BUCKET: continue-server-binaries
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: "us-west-1"
|
||||
SOURCE_DIR: "exe"
|
||||
|
||||
- name: Upload binaries to S3 (s3.continue.dev)
|
||||
uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks
|
||||
env:
|
||||
AWS_S3_BUCKET: s3.continue.dev
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: "us-west-1"
|
||||
SOURCE_DIR: "exe"
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ const BottomMessageDiv = styled.div<{ displayOnBottom: boolean }>`
|
|||
z-index: 100;
|
||||
box-shadow: 0px 0px 2px 0px ${vscForeground};
|
||||
max-height: 35vh;
|
||||
overflow: scroll;
|
||||
`;
|
||||
|
||||
const Footer = styled.footer`
|
||||
|
|
|
|||
|
|
@ -438,7 +438,7 @@ export async function startContinuePythonServer(redownload: boolean = true) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Check if on Apple Silicon, or if the exe folder is empty - have to download binary from S3
|
||||
// If on Apple Silicon, download binary from S3
|
||||
// const isAppleSilicon = os.platform() === "darwin" && os.arch() === "arm64";
|
||||
// if (isAppleSilicon) {
|
||||
// await setupWithS3Download(redownload, serverUrl);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue