Repository navigation
77 lines (60 loc) · 2.37 KB
/
Copy pathall.yml
File metadata and controls
77 lines (60 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Build compilers (WASI + Emscripten)
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
WASI_SDK_VERSION: 33
jobs:
build:
runs-on: ubuntu-24.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 1
run: make -k WASI_SDK=$WASI_SDK_DIR -j8 prepare acme dasm vasm zmac naken_asm c2t makewav merlin32 smlrc nesasm
if: success() || failure()
- name: Build WASI tools 2
run: make -k WASI_SDK=$WASI_SDK_DIR -j4 prepare yasm cc2600 cc7800 cc65 nesfab
if: success() || failure()
- name: Run WASI tests
run: make -k WASI_SDK=$WASI_SDK_DIR test
if: success() || failure()
- name: Show WASM file hashes
run: md5sum output/wasm/*.wasm
if: success() || failure()
# - name: Publish Artifacts
# uses: actions/upload-artifact@v4
# if: success() || failure()
# with:
# name: compilers_wasm_js_fs
# path: output/