enso/actions/setup-build/action.yml

52 lines
1.8 KiB
YAML
Raw Normal View History

2022-05-23 05:16:04 +03:00
name: "Setup Enso Build"
description: "Installs enso-build tool."
inputs:
clean:
description: Whether the repository should be cleaned.
required: true
default: "false"
# enso_ref:
# description: Reference to be cheked out in the Enso repository.
# required: false
# default: ''
runs:
using: "composite"
steps:
- name: Setup conda (GH runners only)
uses: s-weigand/setup-conda@v1.0.5
if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') # GitHub-hosted runner.
with:
update-conda: false
conda-channels: anaconda, conda-forge
- name: Install wasm-pack (macOS GH runners only)
env:
2022-12-14 20:45:39 +03:00
WASMPACKURL: https://github.com/rustwasm/wasm-pack/releases/download/v0.10.3
WASMPACKDIR: wasm-pack-v0.10.3-x86_64-apple-darwin
2022-05-23 05:16:04 +03:00
run: |-
curl -L "$WASMPACKURL/$WASMPACKDIR.tar.gz" | tar -xz -C .
mv $WASMPACKDIR/wasm-pack ~/.cargo/bin
rm -r $WASMPACKDIR
shell: bash
if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent') # GitHub-hosted runner.
# - uses: actions/checkout@v3
# name: Checkout the repository
# with:
# clean: ${{ inputs.clean }}
# Runs a set of commands using the runners shell
- uses: actions/github-script@v6
name: Setup the Artifact API environment
with:
script: |-
core.exportVariable("ACTIONS_RUNTIME_TOKEN", process.env["ACTIONS_RUNTIME_TOKEN"])
core.exportVariable("ACTIONS_RUNTIME_URL", process.env["ACTIONS_RUNTIME_URL"])
core.exportVariable("GITHUB_RETENTION_DAYS", process.env["GITHUB_RETENTION_DAYS"])
Bumped the build script (#3489) * The bash entry point was renamed `run.sh` -> `run`. Thanks to that `./run` works both on Linux and Windows with PowerShell (sadly not on CMD). * Everyone's favorite checks for WASM size and program versions are back. These can be disabled through `--wasm-size-limit=0` and `--skip-version-check` respectively. WASM size limit is stored in `build-config.yaml`. * Improved diagnostics for case when downloaded CI run artifact archive cannot be extracted. * Added GH API authentication to the build script calls on CI. This should fix the macOS build failures that were occurring from time to time. (Actually they were due to runner being GitHub-hosted, not really an OS-specific issue by itself.) * If the GH API Personal Access Token is provided, it will be validated. Later on it is difficult to say, whether fail was caused by wrong PAT or other issue. * Renamed `clean` to `git-clean` as per suggestion to reduce risk of user accidently deleting unstaged work. * Whitelisting dependabot from changelog checks, so PRs created by it are mergeable. * Fixing issue where wasm-pack-action (third party) randomly failed to recognize the latest version of wasm-pack (macOS runners), leading to failed builds. * Build logs can be filtered using `ENSO_BUILD_LOG` environment variable. See https://docs.rs/tracing-subscriber/0.3.11/tracing_subscriber/struct.EnvFilter.html#directives for the supported syntax. * Improve help for ci-run source, to make clear that PAT token is required and what scope is expected there. Also, JS parts were updated with some cleanups and fixes following the changes made when introducing the build script.
2022-06-01 14:44:40 +03:00
- run: ./run --help
2022-05-23 05:16:04 +03:00
shell: bash
if: runner.os != 'Windows'
- run: .\run.cmd --help
shell: cmd
if: runner.os == 'Windows'