Skip to content

Commit

Permalink
ci: revert workflow (avoid docker approach, too slow)
Browse files Browse the repository at this point in the history
  • Loading branch information
shiqimei committed Jun 14, 2023
1 parent f9b8126 commit 901189f
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 32 deletions.
50 changes: 37 additions & 13 deletions .github/workflows/cmake-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,51 @@ name: Build Debug target

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/openquickjs/quickjs-testing-env:latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure CMake
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true

- name: Build target
run: cmake --build ${{github.workspace}}/build --target qjs run-test262 -j 8
- name: Install cbindgen
run: cargo install --force cbindgen

- name: Test
run: ./bin/qjs -e 'console.log("Hello, World!")'
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
~/.ninja
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install Ninja
run: |
if [ ! -d "$HOME/.ninja" ]; then
mkdir $HOME/.ninja
curl -L https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip -o $HOME/.ninja/ninja.zip
unzip $HOME/.ninja/ninja.zip -d $HOME/.ninja
echo "$HOME/.ninja" >> $GITHUB_PATH
fi
- name: Configure CMake
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug

- name: Build target
run: cmake --build ${{github.workspace}}/build --target qjs run-test262 -j 8

- name: Test
run: ./bin/qjs -e 'console.log("Hello, World!")'
29 changes: 27 additions & 2 deletions .github/workflows/cmake-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,39 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/openquickjs/quickjs-testing-env:latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true

- name: Install cbindgen
run: cargo install --force cbindgen

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
~/.ninja
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install Ninja
run: |
if [ ! -d "$HOME/.ninja" ]; then
mkdir $HOME/.ninja
curl -L https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip -o $HOME/.ninja/ninja.zip
unzip $HOME/.ninja/ninja.zip -d $HOME/.ninja
echo "$HOME/.ninja" >> $GITHUB_PATH
fi
- name: Configure CMake
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release

Expand Down
17 changes: 0 additions & 17 deletions Dockerfile

This file was deleted.

0 comments on commit 901189f

Please sign in to comment.