Skip to content

Commit

Permalink
Update workflows for LLVM flang 17 and Nix
Browse files Browse the repository at this point in the history
  • Loading branch information
georgestagg committed Nov 27, 2023
1 parent 6a0d162 commit fcc6254
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 61 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ jobs:
build:
name: Build webR
runs-on: ubuntu-latest
container: ghcr.io/r-wasm/webr-flang:main
container: ghcr.io/r-wasm/flang-wasm:main
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- uses: actions/checkout@v3
- name: Set npm dist-tag to "next" if pre-release version
if: contains(github.ref_name, '-dev') || contains(github.ref_name, '-rc')
run: echo "DIST_TAG=next" >> $GITHUB_ENV
- name: Install required system packages
run: apt-get update && apt-get install -y gh jq sudo
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: quarto-dev/quarto-actions/setup@v2
- name: Install required R packages
- name: Install required R packages for building documentation
run: Rscript -e 'install.packages(c("rmarkdown", "rvest"))'
- name: Configure webR for flang
env:
EMFC: /opt/flang/host/bin/flang-new
run: ./configure
- name: Copy flang into webR tree
run: |
cp -r /opt/flang/wasm .
cp -r /opt/flang/host .
cp /opt/flang/emfc ./host/bin/emfc
- name: Setup Emscripten PATH
run: echo "/opt/emsdk:/opt/emsdk/upstream/emscripten" >> $GITHUB_PATH
- name: Set Emscripten EM_NODE_JS
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Build all optional wasm libs
env:
EMSDK: /opt/emsdk
run: cd libs && make all
run: cd libs && make all -j
- name: Build webR
env:
EMSDK: /opt/emsdk
Expand All @@ -53,6 +53,11 @@ jobs:
- name: Build webR documentation
run: cd src/docs && make
shell: bash
- name: Publish to npm
if: "!contains(github.ref_name, 'main')"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: cd src && make publish
- name: Report code coverage
uses: codecov/codecov-action@v3
with:
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/npm.yml

This file was deleted.

19 changes: 12 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,19 @@ on:
workflow_dispatch:

jobs:
build:
build-docker:
runs-on: ubuntu-latest
container: ghcr.io/r-wasm/webr-flang:main
container: ghcr.io/r-wasm/flang-wasm:main
steps:
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- uses: actions/checkout@v3
- name: Configure webR for flang
env:
EMFC: /opt/flang/host/bin/flang-new
run: ./configure
- name: Copy flang into webR tree
run: |
cp -r /opt/flang/wasm .
cp -r /opt/flang/host .
cp /opt/flang/emfc ./host/bin/emfc
- name: Setup Emscripten PATH
run: echo "/opt/emsdk:/opt/emsdk/upstream/emscripten" >> $GITHUB_PATH
- name: Set Emscripten EM_NODE_JS
Expand All @@ -41,3 +38,11 @@ jobs:
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CC_TOKEN }}
build-nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build Nix package
run: nix build --print-build-logs

0 comments on commit fcc6254

Please sign in to comment.