Default to ${{ runner.arch }} instead of to x64 (#114)

* If the user does not specify the `arch` input, default to `${{ runner.arch }}` (instead of defaulting to `x64`)

* Add a CI workflow that tests the default arch (i.e. tests what happens when the user does not specify the `arch` input)
This commit is contained in:
Dilum Aluthge
2022-06-24 08:39:02 -04:00
committed by GitHub
parent 76f26cb710
commit 8474f0e14d
3 changed files with 39 additions and 6 deletions

View File

@@ -0,0 +1,33 @@
name: Example builds (default arch)
on:
push:
branches: ['main', 'master', 'releases/*']
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
julia-version: ['1']
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v1.0.0
- name: "Install dependencies"
run: |
npm install --legacy-peer-deps
npm run build
npm run pack
- name: "Set up Julia"
id: setup-julia
uses: ./
with:
version: ${{ matrix.julia-version }}
- run: julia --version
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'

View File

@@ -46,7 +46,7 @@ This action sets up a Julia environment for use in actions by downloading a spec
#
# Note: you can use X64, X86, and ARM64 as synonyms for x64, x86, and aarch64, respectively.
#
# Default: x64
# Defaults to the architecture of the runner executing the job.
arch: ''
# Set the display setting for printing InteractiveUtils.versioninfo() after installing.

View File

@@ -6,9 +6,9 @@ inputs:
description: 'The Julia version to download (if necessary) and use. Example: 1.0.4'
default: '1'
arch:
description: 'Architecture of the Julia binaries. Defaults to x64.'
description: 'Architecture of the Julia binaries. Defaults to the architecture of the runner executing the job.'
required: false
default: 'x64'
default: '${{ runner.arch }}'
show-versioninfo:
description: 'Display InteractiveUtils.versioninfo() after installing'
required: false