Skip to content

Commit

Permalink
Build REPL on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Nov 7, 2023
1 parent f5eaac4 commit ee8282a
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 3 deletions.
66 changes: 65 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
on: pull_request
on:
pull_request:
push:
branches:
- 'repl-v2-ide'

name: Continuous Integration

Expand Down Expand Up @@ -70,6 +74,15 @@ jobs:
- run: yarn --frozen-lockfile
- run: yarn build-native-release
- run: yarn test:unit
- name: Upload @parcel/rust Linux Binaries artifact
if: ${{matrix.os == 'ubuntu-latest' && matrix.node == 20}}
uses: actions/upload-artifact@v2
with:
name: Rust Linux Binaries
path: |
packages/core/rust/index.d.ts
packages/core/rust/index.js
packages/core/rust/*.node
integration_tests:
name: Integration tests (${{matrix.os}}, Node ${{matrix.node}})
Expand Down Expand Up @@ -109,6 +122,57 @@ jobs:
name: Integration tests (${{matrix.os}}, node ${{matrix.node}})
path: '**/junit-*.xml'

repl_build:
name: Build REPL
runs-on: ubuntu-latest
needs: [unit_tests]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
node-version: 20
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Install wasm-opt
run: |
curl -L -O https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-linux.tar.gz
tar -xf binaryen-version_116-x86_64-linux.tar.gz
echo "$PWD/binaryen-version_116/bin" >> $GITHUB_PATH
- uses: Swatinem/rust-cache@v1
with:
key: wasm
- name: Bump max inotify watches
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p;
- run: yarn --frozen-lockfile
- name: Download @parcel/rust Linux Binaries artifact
uses: actions/download-artifact@v3
with:
name: Rust Linux Binaries
path: packages/core/rust
- run: yarn build
- run: yarn build-native-wasm
- run: yarn workspace @parcel/repl build
- name: Upload REPL
uses: actions/upload-artifact@v2
with:
name: REPL
path: 'packages/dev/repl/dist'
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
id: vercel-action
with:
vercel-token: ${{ secrets.REPL_VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.REPL_VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.REPL_VERCEL_PROJECT_ID }}
github-comment: false
working-directory: packages/dev/repl
# vercel-args: '--prod'
# alias-domains: |
# staging.angular.vercel-action.amond.dev
# pr-{{PR_NUMBER}}.angular.vercel-action.amond.dev

test_report:
name: Test report
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions packages/dev/repl/write-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ let file = path.join(__dirname, 'commit');
let oldCommit = fs.existsSync(file) && fs.readFileSync(file, 'utf8').trim();

const newCommit = child_process
.execSync('git merge-base v2 HEAD', {encoding: 'utf8'})
// .execSync('git rev-parse HEAD', {encoding: 'utf8'})
// .execSync('git merge-base v2 HEAD', {encoding: 'utf8'})
.execSync('git rev-parse HEAD', {encoding: 'utf8'})
.trim();

if (oldCommit !== newCommit) {
Expand Down

0 comments on commit ee8282a

Please sign in to comment.