Repository navigation
updated nesfab build #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build compilers (WASI + Emscripten) | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| env: | |
| WASI_SDK_VERSION: 33 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Init submodules | |
| run: git submodule update --init --recursive | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential autoconf automake libtool \ | |
| bison flex re2c nasm texinfo zlib1g-dev libboost-all-dev \ | |
| libfl-dev ccache zip unzip | |
| - name: Set WASI_SDK_DIR | |
| run: echo "WASI_SDK_DIR=$HOME/wasi-sdk" >> $GITHUB_ENV | |
| - name: Install wasi-sdk | |
| run: | | |
| wget -q https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz | |
| mkdir -p $(dirname $WASI_SDK_DIR) | |
| tar xzf wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz -C $(dirname $WASI_SDK_DIR) | |
| mv $(dirname $WASI_SDK_DIR)/wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux $WASI_SDK_DIR | |
| - name: Verify wasi-sdk | |
| run: $WASI_SDK_DIR/bin/clang --version | |
| - name: Install wasmtime | |
| run: | | |
| curl -sSfL https://github.com/bytecodealliance/wasmtime/releases/download/v25.0.2/wasmtime-v25.0.2-x86_64-linux.tar.xz | tar xJ | |
| sudo install wasmtime-v25.0.2-x86_64-linux/wasmtime /usr/local/bin/wasmtime | |
| wasmtime --version | |
| - name: Add wasm32-wasip1 Rust target | |
| run: rustup target add wasm32-wasip1 | |
| # ---- WASI tools ---- | |
| - name: Build WASI tools | |
| run: make -k WASI_SDK=$WASI_SDK_DIR acme dasm yasm vasm zmac naken_asm \ | |
| c2t makewav merlin32 smlrc nesasm cc2600 cc7800 cc65 nesfab | |
| if: success() || failure() | |
| - name: Run WASI tests | |
| run: make -k WASI_SDK=$WASI_SDK_DIR test | |
| if: success() || failure() | |
| # - name: Publish Artifacts | |
| # uses: actions/upload-artifact@v4 | |
| # if: success() || failure() | |
| # with: | |
| # name: compilers_wasm_js_fs | |
| # path: output/ |