blob: ee38740bb47dcd8d56275dd22e081a423c5745d0 [file]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
{% import 'macros.jinja' as macros with context %}
{{ macros.github_header() }}
jobs:
r-universe-wasm:
name: "R-universe Wasm build"
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
{{ macros.github_checkout_arrow()|indent }}
- uses: r-lib/actions/setup-r@v2
with:
install-r: true
- name: Build Arrow R source package
shell: bash
run: |
cd arrow/r
make sync-cpp
R CMD build --no-build-vignettes .
- name: Pull the R-universe Wasm image
shell: bash
run: docker pull ghcr.io/r-universe-org/build-wasm:latest
- name: Build Wasm binary in the R-universe container
shell: bash
run: |
docker run --rm \
-v "${PWD}/arrow/r:/work" \
-w /work \
ghcr.io/r-universe-org/build-wasm:latest \
bash -lc '
set -euxo pipefail
R -q -e "if (!requireNamespace(\"pak\", quietly = TRUE)) install.packages(\"pak\", repos = \"https://cloud.r-project.org\"); if (!requireNamespace(\"rwasm\", quietly = TRUE)) pak::pak(\"r-wasm/rwasm\"); rwasm::build(\".\")" \
2>&1 | tee build-wasm.log
'
- name: List generated artifacts
if: always()
shell: bash
run: |
ls -lh arrow/r/arrow_*.tar.gz
ls -lh arrow/r/arrow_*.tgz || true
ls -lh arrow/r/build-wasm.log || true
- name: Upload Wasm build artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: r-wasm-build
path: |
arrow/r/arrow_*.tar.gz
arrow/r/arrow_*.tgz
arrow/r/build-wasm.log