diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-08-01 16:29:10 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-08-01 16:29:10 -0700 |
commit | 2a9d057c5b173c01977e3ae5299f685b474b1eab (patch) | |
tree | 68e1ffadbfc32f3f812363e91095e2a1d53e403f | |
parent | f9148fd279e8af0a145308c96c4f5b5536b1e4e8 (diff) | |
download | sncontinue-2a9d057c5b173c01977e3ae5299f685b474b1eab.tar.gz sncontinue-2a9d057c5b173c01977e3ae5299f685b474b1eab.tar.bz2 sncontinue-2a9d057c5b173c01977e3ae5299f685b474b1eab.zip |
fixes to main.yaml, build nodejs
-rw-r--r-- | .github/workflows/main.yaml | 162 | ||||
-rw-r--r-- | extension/server/.gitignore | 3 | ||||
-rwxr-xr-x | extension/server/exe/run-darwin | bin | 16421088 -> 0 bytes | |||
-rw-r--r-- | extension/server/exe/run-linux | bin | 28788480 -> 0 bytes | |||
-rw-r--r-- | extension/server/exe/run-win.exe | bin | 15593484 -> 0 bytes | |||
-rw-r--r-- | extension/src/activation/environmentSetup.ts | 2 |
6 files changed, 95 insertions, 72 deletions
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 24835d78..f866bf78 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -41,74 +41,94 @@ jobs: uses: actions/upload-artifact@v3 with: name: ${{ runner.os }} Build - path: dist/run - - # publish: - # runs-on: ubuntu-latest - - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - - # - name: Set up Python - # uses: actions/setup-python@v2 - # with: - # python-version: "3.8" - - # - name: Install Poetry - # run: | - # curl -sSL https://install.python-poetry.org | python3 - - - # - name: Install Python dependencies - # run: | - # cd continuedev - # poetry install - - # - name: Cache extension node_modules - # uses: actions/cache@v2 - # with: - # path: extension/node_modules - # key: ${{ runner.os }}-node-${{ hashFiles('extension/package-lock.json') }} - - # - name: Cache react-app node_modules - # uses: actions/cache@v2 - # with: - # path: extension/react-app/node_modules - # key: ${{ runner.os }}-node-${{ hashFiles('extension/react-app/package-lock.json') }} - - # - name: Set up Node.js - # uses: actions/setup-node@v2 - # with: - # node-version: "14" - - # - name: Install extension Dependencies - # run: | - # cd extension - # npm ci --legacy-peer-deps - - # - name: Install react-app Dependencies - # run: | - # cd extension/react-app - # npm ci --legacy-peer-deps - - # - name: Build and Publish - # run: | - # cd extension - # npm run full-package - - # - name: Commit changes - # run: | - # git config --local user.email "action@github.com" - # git config --local user.name "GitHub Action" - # git commit -am "Update package.json version [skip ci]" - - # - name: Push changes - # uses: ad-m/github-push-action@master - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - - # - name: Upload .vsix artifact - # uses: actions/upload-artifact@v2 - # with: - # name: vsix-artifact - # path: extension/build/* + path: dist/* + + publish: + needs: pyinstaller + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Download Linux build + uses: actions/download-artifact@v2 + with: + name: Linux Build + path: extension/server/exe/run-linux + + - name: Download macOS build + uses: actions/download-artifact@v2 + with: + name: macOS Build + path: extension/server/exe/run-darwin + + - name: Download Windows build + uses: actions/download-artifact@v2 + with: + name: Windows Build + path: extension/server/exe/run-windows.exe + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + + - name: Install Python dependencies + run: | + cd continuedev + poetry install + + - name: Cache extension node_modules + uses: actions/cache@v2 + with: + path: extension/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('extension/package-lock.json') }} + + - name: Cache react-app node_modules + uses: actions/cache@v2 + with: + path: extension/react-app/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('extension/react-app/package-lock.json') }} + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: "14" + + - name: Install extension Dependencies + run: | + cd extension + npm ci --legacy-peer-deps + + - name: Install react-app Dependencies + run: | + cd extension/react-app + npm ci --legacy-peer-deps + + - name: Build and Publish + run: | + cd extension + npm run full-package + + - name: Commit changes + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -am "Update package.json version [skip ci]" + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} + + - name: Upload .vsix artifact + uses: actions/upload-artifact@v2 + with: + name: vsix-artifact + path: extension/build/* diff --git a/extension/server/.gitignore b/extension/server/.gitignore index 0b6e11dd..d501b5cd 100644 --- a/extension/server/.gitignore +++ b/extension/server/.gitignore @@ -1 +1,2 @@ -**.whl
\ No newline at end of file +**.whl +exe/**
\ No newline at end of file diff --git a/extension/server/exe/run-darwin b/extension/server/exe/run-darwin Binary files differdeleted file mode 100755 index 4d8323ef..00000000 --- a/extension/server/exe/run-darwin +++ /dev/null diff --git a/extension/server/exe/run-linux b/extension/server/exe/run-linux Binary files differdeleted file mode 100644 index 3efe5633..00000000 --- a/extension/server/exe/run-linux +++ /dev/null diff --git a/extension/server/exe/run-win.exe b/extension/server/exe/run-win.exe Binary files differdeleted file mode 100644 index 30466272..00000000 --- a/extension/server/exe/run-win.exe +++ /dev/null diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 5e2e3c0f..a0d6a653 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -455,6 +455,8 @@ export async function startContinuePythonServer() { exePath = path.join(exeDir, "run-win.exe"); } else if (os.platform() === "darwin") { exePath = path.join(exeDir, "run-darwin"); + // Add permissions + await runCommand(`chmod +x ${exePath}`); await runCommand(`xattr -dr com.apple.quarantine ${exePath}`); } else { exePath = path.join(exeDir, "run-linux"); |