mirror of
https://github.com/copy/v86.git
synced 2025-12-31 04:23:15 +00:00
Merge them into one workflow
This commit is contained in:
parent
fc51f2b9d2
commit
7f2d70beaf
3 changed files with 143 additions and 145 deletions
143
.github/workflows/ci.yml
vendored
Normal file
143
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
jshint:
|
||||
name: JSHint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run JSHint
|
||||
run: sudo npm install -g jshint; make jshint
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build and test
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup toolchain
|
||||
run: |
|
||||
rustup toolchain install stable --profile minimal
|
||||
rustup target add wasm32-unknown-unknown
|
||||
rustup component add rustfmt
|
||||
|
||||
- name: Install APT packages
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install nasm gdb qemu-system-x86 libc6-dev-i386 -y
|
||||
|
||||
- name: Build all-debug
|
||||
run: make all-debug
|
||||
|
||||
- name: Build all
|
||||
run: make all
|
||||
|
||||
- name: Fetch kvm-unit-test cache
|
||||
uses: actions/cache@v3
|
||||
id: cache-kvm-unit-test
|
||||
with:
|
||||
path: tests/kvm-unit-tests/
|
||||
key: ${{ runner.os }}-kvm-unit-test
|
||||
|
||||
- name: Build kvm-unit-test
|
||||
if: steps.cache-kvm-unit-test.outputs.cache-hit != 'true'
|
||||
run: (cd tests/kvm-unit-tests && ./configure && make x86/realmode.flat)
|
||||
|
||||
- name: Run kvm-unit-test
|
||||
run: tests/kvm-unit-tests/run.js tests/kvm-unit-tests/x86/realmode.flat
|
||||
|
||||
- name: Fetch namsmtests cache
|
||||
uses: actions/cache@v3
|
||||
id: cache-nasmtests
|
||||
with:
|
||||
path: tests/nasm/build/
|
||||
key: ${{ runner.os }}-nasmtests
|
||||
|
||||
- name: Build namsmtests
|
||||
if: steps.cache-nasmtests.outputs.cache-hit != 'true'
|
||||
run: tests/nasm/create_tests.js; make -C tests/nasm all; ./tests/nasm/gen_fixtures.js
|
||||
|
||||
- name: Run nasmtests
|
||||
run: MAX_PARALLEL_TESTS=1 ./tests/nasm/run.js
|
||||
|
||||
- name: Run nasmtests-force-jit
|
||||
run: MAX_PARALLEL_TESTS=1 ./tests/nasm/run.js --force-jit
|
||||
|
||||
- name: Run rust-test
|
||||
run: make rust-test
|
||||
|
||||
- name: Fetch image cache
|
||||
uses: actions/cache@v3
|
||||
id: cache-images
|
||||
with:
|
||||
path: images/
|
||||
key: ${{ runner.os }}-images-v2
|
||||
|
||||
- name: Download uncached images
|
||||
if: steps.cache-images.outputs.cache-hit != 'true'
|
||||
run: wget -nv -P images/ https://k.copy.sh/{linux.iso,linux3.iso,linux4.iso,buildroot-bzimage.bin,TinyCore-11.0.iso,oberon.img,msdos.img,openbsd-floppy.img,kolibri.img,windows101.img,os8.img,freedos722.img,mobius-fd-release5.img}
|
||||
|
||||
- name: Run api-tests
|
||||
run: make api-tests
|
||||
|
||||
- name: Run qemutests
|
||||
run: make qemutests
|
||||
|
||||
- name: Run qemutests-release
|
||||
run: make qemutests-release
|
||||
|
||||
- name: Run jitpagingtests
|
||||
run: make jitpagingtests
|
||||
|
||||
- name: Run integration tests
|
||||
run: MAX_PARALLEL_TESTS=1 make tests
|
||||
|
||||
- name: Run expect tests
|
||||
run: make expect-tests
|
||||
|
||||
- name: Upload the artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: v86
|
||||
path: |
|
||||
build/*.js
|
||||
build/*.js.map
|
||||
build/*.wasm
|
||||
!build/libwabt.js
|
||||
!build/dummy_output.wasm
|
||||
|
||||
upload:
|
||||
name: Upload release
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
if: github.ref == 'refs/heads/master'
|
||||
|
||||
steps:
|
||||
- name: Delete old release and tag
|
||||
uses: dev-drprasad/delete-tag-and-release@v1.0.1
|
||||
with:
|
||||
delete_release: true
|
||||
tag_name: latest
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: build
|
||||
|
||||
- name: Release to GitHub
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
name: Latest Release
|
||||
tag: latest
|
||||
commit: master
|
||||
body: ${{ github.event.head_commit.message }}
|
||||
artifacts: "build/v86/*.js, build/v86/*.js.map, build/v86/*.wasm"
|
||||
prerelease: true
|
||||
82
.github/workflows/main.yml
vendored
82
.github/workflows/main.yml
vendored
|
|
@ -1,82 +0,0 @@
|
|||
name: main
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
jobs:
|
||||
jshint:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: sudo npm install -g jshint; make jshint
|
||||
test:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/cache@v3
|
||||
id: cache-rustup
|
||||
with:
|
||||
path: ~/.cache/rustup/
|
||||
key: ${{ runner.os }}-rustup
|
||||
- name: rustup
|
||||
run: |
|
||||
rustup toolchain install stable
|
||||
rustup target add wasm32-unknown-unknown
|
||||
rustup component add rustfmt
|
||||
|
||||
- name: apt install
|
||||
run: sudo apt update -qq; sudo apt install nasm gdb qemu-system-x86 libc6-dev-i386
|
||||
- name: make all-debug
|
||||
run: make all-debug
|
||||
- name: make all
|
||||
run: make all
|
||||
|
||||
- uses: actions/cache@v3
|
||||
id: cache-kvm-unit-test
|
||||
with:
|
||||
path: tests/kvm-unit-tests/
|
||||
key: ${{ runner.os }}-kvm-unit-test
|
||||
- name: build kvm-unit-test
|
||||
if: steps.cache-kvm-unit-test.outputs.cache-hit != 'true'
|
||||
run: (cd tests/kvm-unit-tests && ./configure && make x86/realmode.flat)
|
||||
- name: kvm-unit-test
|
||||
run: tests/kvm-unit-tests/run.js tests/kvm-unit-tests/x86/realmode.flat
|
||||
|
||||
- uses: actions/cache@v3
|
||||
id: cache-nasmtests
|
||||
with:
|
||||
path: tests/nasm/build/
|
||||
key: ${{ runner.os }}-nasmtests
|
||||
- name: build namsmtests
|
||||
if: steps.cache-nasmtests.outputs.cache-hit != 'true'
|
||||
run: tests/nasm/create_tests.js; make -C tests/nasm all; ./tests/nasm/gen_fixtures.js
|
||||
- name: nasmtests
|
||||
run: MAX_PARALLEL_TESTS=1 ./tests/nasm/run.js
|
||||
- name: nasmtests-force-jit
|
||||
run: MAX_PARALLEL_TESTS=1 ./tests/nasm/run.js --force-jit
|
||||
|
||||
- name: rust-test
|
||||
run: make rust-test
|
||||
|
||||
- uses: actions/cache@v3
|
||||
id: cache-images
|
||||
with:
|
||||
path: images/
|
||||
key: ${{ runner.os }}-images-v2
|
||||
- name: get images
|
||||
if: steps.cache-images.outputs.cache-hit != 'true'
|
||||
run: wget -nv -P images/ https://k.copy.sh/{linux.iso,linux3.iso,linux4.iso,buildroot-bzimage.bin,TinyCore-11.0.iso,oberon.img,msdos.img,openbsd-floppy.img,kolibri.img,windows101.img,os8.img,freedos722.img,mobius-fd-release5.img}
|
||||
|
||||
- name: api-tests
|
||||
run: make api-tests
|
||||
- name: qemutests
|
||||
run: make qemutests
|
||||
- name: qemutests-release
|
||||
run: make qemutests-release
|
||||
- name: jitpagingtests
|
||||
run: make jitpagingtests
|
||||
- name: integration tests
|
||||
run: MAX_PARALLEL_TESTS=1 make tests
|
||||
- name: expect tests
|
||||
run: make expect-tests
|
||||
63
.github/workflows/release.yml
vendored
63
.github/workflows/release.yml
vendored
|
|
@ -1,63 +0,0 @@
|
|||
name: Automated Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build v86
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup toolchain
|
||||
run: |
|
||||
rustup toolchain install stable --profile minimal
|
||||
rustup target add wasm32-unknown-unknown
|
||||
rustup component add rustfmt
|
||||
|
||||
- name: Build v86
|
||||
run: make build/libv86.js build/v86.wasm build/v86-fallback.wasm
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: v86
|
||||
path: |
|
||||
build/*.js
|
||||
build/*.js.map
|
||||
build/*.wasm
|
||||
|
||||
upload:
|
||||
name: Upload release
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: github.ref == 'refs/heads/master'
|
||||
|
||||
steps:
|
||||
- name: Delete old release and tag
|
||||
uses: dev-drprasad/delete-tag-and-release@v1.0.1
|
||||
with:
|
||||
delete_release: true
|
||||
tag_name: latest
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: build
|
||||
|
||||
- name: Release to GitHub
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
name: Latest Release
|
||||
tag: latest
|
||||
commit: master
|
||||
body: ${{ github.event.head_commit.message }}
|
||||
artifacts: "build/v86/*.js, build/v86/*.js.map, build/v86/*.wasm"
|
||||
prerelease: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue