Compare commits

..

2 Commits

Author SHA1 Message Date
Sascha Mann
63a8389699 Add production dependencies & build 2022-05-23 23:32:37 +02:00
Sascha Mann
4b10f2b699 Unmount dmg file on macOS after copying files 2022-05-23 23:31:02 +02:00
11 changed files with 25 additions and 60 deletions

View File

@@ -8,7 +8,7 @@ jobs:
- uses: actions/checkout@v1
- name: "npm ci"
run: npm ci --legacy-peer-deps
run: npm ci
- name: "npm run build"
run: npm run build

View File

@@ -1,33 +0,0 @@
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

@@ -26,7 +26,7 @@ jobs:
- name: "Install dependencies"
run: |
npm install --legacy-peer-deps
npm install
npm run build
npm run pack

View File

@@ -25,7 +25,7 @@ jobs:
- name: "Install dependencies"
run: |
npm install --legacy-peer-deps
npm install
npm run build
npm run pack

View File

@@ -44,9 +44,7 @@ This action sets up a Julia environment for use in actions by downloading a spec
#
# Supported values: x64 | x86 | aarch64 (untested)
#
# Note: you can use X64, X86, and ARM64 as synonyms for x64, x86, and aarch64, respectively.
#
# Defaults to the architecture of the runner executing the job.
# Default: x64
arch: ''
# Set the display setting for printing InteractiveUtils.versioninfo() after installing.
@@ -129,7 +127,7 @@ jobs:
matrix:
julia-version: ['1.0', '1.2.0', '^1.3.0-rc1']
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1.0.0
- name: "Set up Julia"
@@ -155,7 +153,7 @@ jobs:
exclude:
- os: macOS-latest
julia-arch: x86
steps:
- uses: actions/checkout@v1.0.0
- name: "Set up Julia"
@@ -182,7 +180,7 @@ jobs:
- os: windows-latest
julia-version: ['1.0.4']
julia-arch: x86
steps:
- uses: actions/checkout@v1.0.0
- name: "Set up Julia"

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 the architecture of the runner executing the job.'
description: 'Architecture of the Julia binaries. Defaults to x64.'
required: false
default: '${{ runner.arch }}'
default: 'x64'
show-versioninfo:
description: 'Display InteractiveUtils.versioninfo() after installing'
required: false

7
dist/index.js vendored
View File

@@ -4268,11 +4268,8 @@ const osMap = {
};
const archMap = {
'x86': 'i686',
'X86': 'i686',
'x64': 'x86_64',
'X64': 'x86_64',
'aarch64': 'aarch64',
'ARM64': 'aarch64'
'aarch64': 'aarch64'
};
// Store information about the environment
const osPlat = os.platform(); // possible values: win32 (Windows), linux (Linux), darwin (macOS)
@@ -4442,6 +4439,8 @@ function installJulia(versionInfo, version, arch) {
case 'darwin':
yield exec.exec('hdiutil', ['attach', juliaDownloadPath]);
yield exec.exec('/bin/bash', ['-c', `cp -a /Volumes/Julia-*/Julia-*.app/Contents/Resources/julia ${tempInstallDir}`]);
// Unmount dmg file again to avoid issues on self-hosted runners
yield exec.exec('hdiutil', ['unmount', juliaDownloadPath]);
return path.join(tempInstallDir, 'julia');
default:
throw new Error(`Platform ${osPlat} is not supported`);

7
lib/installer.js generated
View File

@@ -32,11 +32,8 @@ const osMap = {
};
const archMap = {
'x86': 'i686',
'X86': 'i686',
'x64': 'x86_64',
'X64': 'x86_64',
'aarch64': 'aarch64',
'ARM64': 'aarch64'
'aarch64': 'aarch64'
};
// Store information about the environment
const osPlat = os.platform(); // possible values: win32 (Windows), linux (Linux), darwin (macOS)
@@ -206,6 +203,8 @@ function installJulia(versionInfo, version, arch) {
case 'darwin':
yield exec.exec('hdiutil', ['attach', juliaDownloadPath]);
yield exec.exec('/bin/bash', ['-c', `cp -a /Volumes/Julia-*/Julia-*.app/Contents/Resources/julia ${tempInstallDir}`]);
// Unmount dmg file again to avoid issues on self-hosted runners
yield exec.exec('hdiutil', ['unmount', juliaDownloadPath]);
return path.join(tempInstallDir, 'julia');
default:
throw new Error(`Platform ${osPlat} is not supported`);

7
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "setup-julia",
"version": "1.8.0",
"version": "1.7.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "setup-julia",
"version": "1.8.0",
"version": "1.7.2",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.6",
@@ -12927,7 +12927,8 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz",
"integrity": "sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ==",
"dev": true
"dev": true,
"requires": {}
},
"jest-regex-util": {
"version": "24.3.0",

View File

@@ -1,6 +1,6 @@
{
"name": "setup-julia",
"version": "1.8.0",
"version": "1.7.2",
"private": true,
"description": "setup Julia action",
"main": "lib/setup-julia.js",

View File

@@ -18,11 +18,8 @@ const osMap = {
}
const archMap = {
'x86': 'i686',
'X86': 'i686',
'x64': 'x86_64',
'X64': 'x86_64',
'aarch64': 'aarch64',
'ARM64': 'aarch64'
'aarch64': 'aarch64'
}
// Store information about the environment
@@ -206,6 +203,10 @@ export async function installJulia(versionInfo, version: string, arch: string):
case 'darwin':
await exec.exec('hdiutil', ['attach', juliaDownloadPath])
await exec.exec('/bin/bash', ['-c', `cp -a /Volumes/Julia-*/Julia-*.app/Contents/Resources/julia ${tempInstallDir}`])
// Unmount dmg file again to avoid issues on self-hosted runners
await exec.exec('hdiutil', ['unmount', juliaDownloadPath])
return path.join(tempInstallDir, 'julia')
default:
throw new Error(`Platform ${osPlat} is not supported`)