diff options
Diffstat (limited to '.github/workflows/wasm.yml')
| -rw-r--r-- | .github/workflows/wasm.yml | 76 |
1 files changed, 45 insertions, 31 deletions
diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index f5c8ca62d1..f0263de5ef 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -53,18 +53,22 @@ jobs: if: >- ${{!(false || contains(github.event.head_commit.message, '[DOC]') - || contains(github.event.head_commit.message, 'Document') || contains(github.event.pull_request.title, '[DOC]') - || contains(github.event.pull_request.title, 'Document') || contains(github.event.pull_request.labels.*.name, 'Documentation') - || (github.event_name == 'push' && github.event.pull_request.user.login == 'dependabot[bot]') + || (github.event.pull_request.user.login == 'dependabot[bot]') )}} steps: - - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: sparse-checkout-cone-mode: false sparse-checkout: /.github + persist-credentials: false + + - uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # v1.310.0 + with: + ruby-version: '3.1' + bundler: none - uses: ./.github/actions/setup/directories with: @@ -100,19 +104,10 @@ jobs: run: | echo "WASI_SDK_PATH=/opt/wasi-sdk" >> $GITHUB_ENV - - uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0 + - uses: ./.github/actions/setup/baseruby + id: baseruby with: - ruby-version: '3.0' - bundler: none - - - name: Build baseruby - run: | - set -ex - mkdir ../baseruby - pushd ../baseruby - ../src/configure --prefix=$PWD/install - make - make install + srcdir: src - name: Download config.guess with wasi version run: | @@ -121,19 +116,38 @@ jobs: working-directory: src - name: Run configure - run: | - ../src/configure \ - --host wasm32-unknown-wasi \ - --with-baseruby=$PWD/../baseruby/install/bin/ruby \ - --with-static-linked-ext \ - --with-ext=cgi/escape,continuation,coverage,date,digest/bubblebabble,digest,digest/md5,digest/rmd160,digest/sha1,digest/sha2,etc,fcntl,json,json/generator,json/parser,objspace,pathname,rbconfig/sizeof,ripper,stringio,strscan,monitor \ - LDFLAGS=" \ - -Xlinker --stack-first \ - -Xlinker -z -Xlinker stack-size=16777216 \ - " \ - optflags="${{ matrix.entry.optflags }}" \ - debugflags="${{ matrix.entry.debugflags }}" \ - wasmoptflags="${{ matrix.entry.wasmoptflags }} ${{ matrix.entry.debugflags }}" + run: >- + ../src/configure + --host wasm32-unknown-wasi + --with-baseruby="${{ steps.baseruby.outputs.ruby }}" + --with-dump-ast="${{ steps.baseruby.outputs.dump_ast }}" + --with-static-linked-ext + --with-ext=${EXTS// /,} + LDFLAGS=" + -Xlinker --stack-first + -Xlinker -z -Xlinker stack-size=16777216 + " + optflags="${{ matrix.entry.optflags }}" + debugflags="${{ matrix.entry.debugflags }}" + wasmoptflags="${{ matrix.entry.wasmoptflags }} ${{ matrix.entry.debugflags }}" + env: + EXTS: + cgi/escape + continuation + coverage + date + digest + digest/* + erb/escape + etc + fcntl + json + json/* + objspace + rbconfig/sizeof + ripper + stringio + strscan # miniruby may not be built when cross-compling - run: make mini ruby @@ -142,7 +156,7 @@ jobs: - run: tar cfz ../install.tar.gz -C ../install . - name: Upload artifacts - uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ruby-wasm-install path: ${{ github.workspace }}/install.tar.gz @@ -170,7 +184,7 @@ jobs: - name: Save Pull Request number if: ${{ github.event_name == 'pull_request' }} run: echo "${{ github.event.pull_request.number }}" >> ${{ github.workspace }}/github-pr-info.txt - - uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1 + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 if: ${{ github.event_name == 'pull_request' }} with: name: github-pr-info |
