Skip to content

Aot pre-compiled machine #1672

Aot pre-compiled machine

Aot pre-compiled machine #1672

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
permissions:
contents: read
issues: read
checks: write
pull-requests: write
jobs:
ci:
name: CI
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version: [11, 17]
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Checkout testsuite
uses: actions/checkout@v4
with:
repository: WebAssembly/testsuite
path: testsuite
# The ref needs to stay in sync with the default value in test-gen-plugin
ref: c2a67a575ddc815ff2212f68301d333e5e30a923
- name: Checkout wasi-testsuite
uses: actions/checkout@v4
with:
repository: WebAssembly/wasi-testsuite
path: wasi-testsuite
ref: prod/testsuite-base
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '${{ matrix.version }}'
cache: maven
- name: Check Style
run: mvn -B spotless:check
- name: Test Java
run: mvn -B clean install
readme-ci:
runs-on: ubuntu-latest
name: CI - Readme
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: maven
- name: Build Chicory
run: mvn -B -Dquickly
env:
MAVEN_OPTS: "-Dmaven.repo.local=${{ github.workspace }}/repository"
# Test root Readme
- name: jbang
uses: jbangdev/jbang-action@36d4a384d215d91c2c7e74014a486cedfe09d760 # tag=v0.119.0
with:
script: README.md
env:
JBANG_REPO: "${{ github.workspace }}/repository"
- name: compare results
run: diff -r ./readmes/main/expected ./readmes/main/current
# Test wasi Readme
- name: jbang
uses: jbangdev/jbang-action@36d4a384d215d91c2c7e74014a486cedfe09d760 # tag=v0.119.0
with:
script: wasi/README.md
env:
JBANG_REPO: "${{ github.workspace }}/repository"
- name: compare results
run: diff -r ./readmes/wasi/expected ./readmes/wasi/current
# Test AOT Readme
- name: jbang
uses: jbangdev/jbang-action@36d4a384d215d91c2c7e74014a486cedfe09d760 # tag=v0.119.0
with:
script: aot/README.md
env:
JBANG_REPO: "${{ github.workspace }}/repository"
# Test WASM Readme
- name: jbang
uses: jbangdev/jbang-action@36d4a384d215d91c2c7e74014a486cedfe09d760 # tag=v0.119.0
with:
script: wasm/README.md
env:
JBANG_REPO: "${{ github.workspace }}/repository"
# Test docs index
- name: jbang
uses: jbangdev/jbang-action@36d4a384d215d91c2c7e74014a486cedfe09d760 # tag=v0.119.0
with:
script: docs/docs/index.md
env:
JBANG_REPO: "${{ github.workspace }}/repository"
- name: compare results
run: diff -r ./readmes/index/expected ./readmes/index/current
# Test docs memory
- name: jbang
uses: jbangdev/jbang-action@36d4a384d215d91c2c7e74014a486cedfe09d760 # tag=v0.119.0
with:
script: docs/docs/usage/memory.md
env:
JBANG_REPO: "${{ github.workspace }}/repository"
- name: compare results
run: diff -r ./readmes/memory/expected ./readmes/memory/current
test-results:
name: Test Results
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
folder: [runtime-tests, aot-tests, wasi]
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Checkout testsuite
uses: actions/checkout@v4
with:
repository: WebAssembly/testsuite
path: testsuite
# The ref needs to stay in sync with the default value in test-gen-plugin
ref: c2a67a575ddc815ff2212f68301d333e5e30a923
- name: Checkout wasi-testsuite
uses: actions/checkout@v4
with:
repository: WebAssembly/wasi-testsuite
path: wasi-testsuite
ref: prod/testsuite-base
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: maven
- name: Test Java
run: mvn -B clean install
- name: Name
id: name
run: |
case ${{ matrix.folder }} in
runtime-tests)
echo "NAME=Interpreter" >> $GITHUB_ENV
echo "BADGE_NAME=interpreter" >> $GITHUB_ENV
;;
aot-tests)
echo "NAME=AOT" >> $GITHUB_ENV
echo "BADGE_NAME=aot" >> $GITHUB_ENV
;;
wasi)
echo "NAME=WASI" >> $GITHUB_ENV
echo "BADGE_NAME=wasi" >> $GITHUB_ENV
;;
esac
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
id: test-results
with:
check_name: ${{ env.NAME }} Tests Results
comment_mode: off
compare_to_earlier_commit: false
files: './${{ matrix.folder }}/**/surefire-reports/*.xml'
- name: Publish badge conditional
id: publish
if: |
(github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'main' ||
github.event_name != 'workflow_run' && github.ref == 'refs/heads/main')
run: echo "badge=true" >> $GITHUB_OUTPUT
- name: Set badge color
shell: bash
if: steps.publish.outputs.badge
run: |
case ${{ fromJSON( steps.test-results.outputs.json ).conclusion }} in
success)
echo "BADGE_COLOR=31c653" >> $GITHUB_ENV
;;
failure)
echo "BADGE_COLOR=800000" >> $GITHUB_ENV
;;
neutral)
echo "BADGE_COLOR=696969" >> $GITHUB_ENV
;;
esac
- name: Create badge
uses: emibcn/badge-action@808173dd03e2f30c980d03ee49e181626088eee8
if: steps.publish.outputs.badge
with:
label: 'Tests ${{ env.NAME }}'
status: '${{ fromJSON( steps.test-results.outputs.json ).stats.tests_succ }} success, ${{ fromJSON( steps.test-results.outputs.json ).stats.tests_skip }} skip, ${{ fromJSON( steps.test-results.outputs.json ).stats.tests_fail }} failures, ${{ fromJSON( steps.test-results.outputs.json ).stats.tests_error }} errors, ${{ fromJSON( steps.test-results.outputs.json ).stats.tests }} total'
color: ${{ env.BADGE_COLOR }}
path: badge-${{ env.BADGE_NAME }}.svg
- name: Upload badge to GH Action
uses: actions/upload-artifact@v4
with:
name: badge-${{ env.BADGE_NAME }}
path: badge-${{ env.BADGE_NAME }}.svg
- name: Upload badge to Gist
if: steps.publish.outputs.badge
uses: andymckay/append-gist-action@ab30bf28df67017c7ad696500b218558c7c04db3
with:
token: ${{ secrets.GIST_TOKEN }}
gistURL: https://gist.githubusercontent.com/andreaTP/69354d1cc6cf23e4c3c4a9a8daf7ea15
file: badge-${{ env.BADGE_NAME }}.svg