Compare commits

..

13 Commits

Author SHA1 Message Date
Paulo F. Oliveira 69fb25ba7e Ease consumption (#125)
Don't take `maint-` -prefixed versions into account unless they're asked for it
specifically
At the same time, while fetching versions, make sure we identify them better so that
25 does not end up pulling maint-25 instead of OTP-25.0, as it should
2022-08-01 13:23:47 +01:00
Paulo F. Oliveira caa49b0658 Try current state with Ubuntu 22.04 (#124) 2022-07-12 21:59:53 -05:00
github-actions[bot] ae1b3f83c0 Update 3rd party licenses (#126)
Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2022-07-11 12:27:42 +01:00
Kian-Meng Ang 79c4ce944c Update README: signal OTP-25 as a working version (#122)
See https://github.com/erlef/setup-beam/pull/118
2022-06-27 12:44:56 +01:00
Michał Łępicki a7fc45fd2d Fix mispaste in README.md (#119) 2022-05-31 08:48:37 -05:00
Paulo F. Oliveira ac7b7d515b Test on top of Erlang/OTP 25+ (not RC) (#118)
* Add Erlang/OTP 25+ (not RC) to tests

* Test a specific combo

And a strict version

* Allow testing "edge" cases

We weren't taking our own considerations into account for version strictness
We want to be able to test cases where we use -otp- (if the consumer is doing
it, at least they have to use _strict_ to assert their decision)
2022-05-30 15:11:49 +01:00
Javier Garea b8427d3a11 Fix wrong environment variable descriptions in the README (#115) 2022-05-12 13:46:50 +01:00
github-actions[bot] c9256cba97 Update 3rd party licenses (#114)
Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2022-05-12 13:40:21 +01:00
github-actions[bot] 9627051904 Update 3rd party licenses (#113)
Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2022-05-09 17:24:54 +01:00
github-actions[bot] cb4115cacb Update 3rd party licenses (#112)
Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2022-04-26 13:33:03 +01:00
github-actions[bot] 1bf5800962 Update 3rd party licenses (#111)
Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2022-04-24 13:22:47 +01:00
Paulo F. Oliveira 311afd9034 Apply security fix as proposed by Dependabot (#110)
* Apply security fix as proposed by Dependabot

I actually went to the developer first, pull request the lib., but then my
update got reject, since the lib. moved to TypeScript (from JavaScript);
still, a new release was done and this might just solve our issue

* Update eslint as warned by GitHub notifications
2022-04-23 20:01:06 +01:00
Paulo F. Oliveira 9d4fdad6a1 Feature/run build dist (#109)
* Remove duplicates

We already have everything we need in 3RD_PARTY_LICENSES

* Be mindful of pull request creators
2022-04-21 23:51:29 +01:00
10 changed files with 1349 additions and 1687 deletions
+30 -1
View File
@@ -21,7 +21,25 @@ jobs:
fail-fast: false
matrix:
combo:
- otp-version: '25.0-rc1'
- otp-version: '25'
elixir-version: '1'
rebar3-version: '3'
os: 'ubuntu-22.04'
- otp-version: '24'
elixir-version: '1'
rebar3-version: '3'
os: 'ubuntu-22.04'
- otp-version: '25.0'
elixir-version: 'v1.13.4-otp-25'
rebar3-version: '3.18.0'
os: 'ubuntu-latest'
version-type: 'strict'
- otp-version: '25.0'
elixir-version: 'v1.13.4'
rebar3-version: '3.18.0'
os: 'ubuntu-latest'
version-type: 'strict'
- otp-version: '25'
rebar3-version: 'nightly'
os: 'ubuntu-latest'
- otp-version: '24'
@@ -65,6 +83,10 @@ jobs:
otp-version: '23'
rebar3-version: '3.14'
os: 'ubuntu-18.04'
- elixir-version: 'v1.13.4'
otp-version: '25.0.2'
rebar3-version: '3.19'
os: 'ubuntu-18.04'
- elixir-version: 'v1.10'
otp-version: '23'
rebar3-version: '3.14'
@@ -73,6 +95,10 @@ jobs:
otp-version: '24'
rebar3-version: '3.15'
os: 'ubuntu-20.04'
- elixir-version: 'v1.13.4'
otp-version: '25.0.2'
rebar3-version: '3.19'
os: 'ubuntu-20.04'
- elixir-version: 'v1.11.0'
otp-version: '22.3.4.2'
os: 'ubuntu-20.04'
@@ -87,6 +113,9 @@ jobs:
- elixir-version: 'master'
otp-version: '23.1'
os: 'ubuntu-20.04'
- elixir-version: 'master'
otp-version: '25'
os: 'ubuntu-20.04'
- gleam-version: '0.16'
otp-version: '24'
rebar3-version: '3.16'
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
combo:
- otp-version: '25.0-rc1'
- otp-version: '25'
rebar3-version: 'nightly'
os: 'windows-latest'
- otp-version: '24.0.2'
+390 -719
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -25,6 +25,7 @@ Here are a few things you can do that will increase the likelihood of your pull
- Write tests.
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
- Execute `npm run build-dist` and fix any issues arising from that
## Resources
+10 -8
View File
@@ -18,7 +18,7 @@ workflow by:
- optionally, installing [`hex`](https://hex.pm/)
- optionally, having
[problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md) show
warnings and errors on pull requestsotp-version: false)
warnings and errors on pull requests
**Note**: currently, this action only supports Actions' `ubuntu-` and `windows-` runtimes.
@@ -49,10 +49,11 @@ and Erlang/OTP.
| Operating system | Erlang/OTP | Status
|- |- |-
| ubuntu-18.04 | 17 - 24 | ✅
| ubuntu-20.04 | 20 - 24 | ✅
| windows-2019 | 21* - 24 | ✅
| windows-2022 | 21* - 24 | ✅
| ubuntu-18.04 | 17 - 25 | ✅
| ubuntu-20.04 | 20 - 25 | ✅
| ubuntu-22.04 | 24.2 - 25 | ✅
| windows-2019 | 21* - 25 | ✅
| windows-2022 | 21* - 25 | ✅
**Note** *: prior to 23, Windows builds are only available for minor versions, e.g. 21.0, 21.3, 22.0, etc.
@@ -65,6 +66,7 @@ uses that to download assets:
|- |-
| ubuntu18 | ubuntu-18.04
| ubuntu20 | ubuntu-20.04
| ubuntu22 | ubuntu-22.04
| win19 | windows-2019
| win22 | windows-2022
@@ -192,9 +194,9 @@ jobs:
Base installation folders (useful for e.g. fetching headers for NIFs) are available in the following
environment variables:
- `INSTALL_DIR_FOR_ELIXIR`: base folder for Erlang/OTP
- `INSTALL_DIR_FOR_GLEAM`: base folder for Elixir
- `INSTALL_DIR_FOR_OTP`: base folder for Gleam
- `INSTALL_DIR_FOR_OTP`: base folder for Erlang/OTP
- `INSTALL_DIR_FOR_ELIXIR`: base folder for Elixir
- `INSTALL_DIR_FOR_GLEAM`: base folder for Gleam
- `INSTALL_DIR_FOR_REBAR3`: base folder for `rebar3`
## Elixir Problem Matchers
+11 -9
View File
@@ -6191,12 +6191,12 @@ async function maybeInstallRebar3(rebar3Spec) {
async function getOTPVersion(otpSpec0, osVersion) {
const otpVersions = await getOTPVersions(osVersion)
const otpSpec = otpSpec0.match(/^(OTP-)?([^ ]+)/)
const otpSpec = otpSpec0.match(/^(OTP-|maint-)?([^ ]+)/)
let otpVersion
if (otpSpec[1]) {
if (otpSpec[1] && !isStrictVersion()) {
throw new Error(
`Requested Erlang/OTP version (${otpSpec0}) ` +
"should not contain 'OTP-'",
"should not contain 'OTP-, or maint-'",
)
}
if (otpSpec) {
@@ -6221,7 +6221,7 @@ async function getElixirVersion(exSpec0, otpVersion) {
const exSpec = exSpec0.match(/^v?(.+)(-otp-.+)/) || exSpec0.match(/^v?(.+)/)
let elixirVersion
if (exSpec[2]) {
if (exSpec[2] && !isStrictVersion()) {
throw new Error(
`Requested Elixir / Erlang/OTP version (${exSpec0} / ${otpVersion}) ` +
"should not contain '-otp-...'",
@@ -6310,7 +6310,7 @@ async function getOTPVersions(osVersion) {
.trim()
.split('\n')
.forEach((line) => {
const otpMatch = line.match(/^(OTP-)?([^ ]+)/)
const otpMatch = line.match(/^(OTP-|maint-)?([^ ]+)/)
const otpVersion = otpMatch[2]
otpVersions.set(otpVersion, otpMatch[0]) // we keep the original for later reference
})
@@ -6387,13 +6387,14 @@ async function getRebar3Versions() {
return rebar3VersionsListing
}
function isStrictVersion() {
return core.getInput('version-type', { required: false }) === 'strict'
}
function getVersionFromSpec(spec, versions) {
let version = null
if (
spec.match(/rc/) ||
core.getInput('version-type', { required: false }) === 'strict'
) {
if (spec.match(/rc/) || isStrictVersion()) {
version = spec
}
@@ -6456,6 +6457,7 @@ function getRunnerOSVersion() {
const ImageOSToContainer = {
ubuntu18: 'ubuntu-18.04',
ubuntu20: 'ubuntu-20.04',
ubuntu22: 'ubuntu-22.04',
win19: 'windows-2019',
win22: 'windows-2022',
}
-122
View File
@@ -1,122 +0,0 @@
@actions/core
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/exec
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/http-client
MIT
Actions Http Client for Node.js
Copyright (c) GitHub, Inc.
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/io
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
lru-cache
ISC
The ISC License
Copyright (c) 2010-2022 Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
semver
ISC
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
tunnel
MIT
The MIT License (MIT)
Copyright (c) 2012 Koichi Kobayashi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+890 -814
View File
File diff suppressed because it is too large Load Diff
+5 -4
View File
@@ -3,14 +3,15 @@
"license": "MIT",
"private": true,
"scripts": {
"build": "ncc build src/setup-beam.js --no-cache --license licenses.txt",
"build": "ncc build src/setup-beam.js --no-cache",
"format": "prettier src/**/*.js --write && prettier __tests__/**/*.js --write",
"jslint": "eslint src/**/*.js && eslint __tests__/**/*.js",
"licenses": "yarn licenses generate-disclaimer > 3RD_PARTY_LICENSES",
"markdownlint": "markdownlint *.md",
"shellcheck": "shellcheck src/install-*.sh .github/workflows/*.sh",
"test": "node __tests__/setup-beam.test.js && node ./__tests__/problem-matchers.test.js",
"yamllint": "yamllint .github/workflows/**.yml && yamllint .*.yml && yamllint *.yml"
"yamllint": "yamllint .github/workflows/**.yml && yamllint .*.yml && yamllint *.yml",
"build-dist": "npm install && npm run build && npm run format && npm run markdownlint && npm run shellcheck && npm run yamllint && npm run jslint"
},
"husky": {
"hooks": {
@@ -24,7 +25,7 @@
},
"devDependencies": {
"@vercel/ncc": "0.33.4",
"eslint": "8.13.0",
"eslint": "8.14.0",
"eslint-config-airbnb": "19.0.4",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsx-a11y": "6.5.1",
@@ -33,7 +34,7 @@
"markdownlint": "0.25.1",
"prettier": "2.6.2",
"shellcheck": "1.1.0",
"yaml-lint": "1.2.4",
"yaml-lint": "1.3.0",
"yarn": "1.22.18"
},
"engines": {
+11 -9
View File
@@ -139,12 +139,12 @@ async function maybeInstallRebar3(rebar3Spec) {
async function getOTPVersion(otpSpec0, osVersion) {
const otpVersions = await getOTPVersions(osVersion)
const otpSpec = otpSpec0.match(/^(OTP-)?([^ ]+)/)
const otpSpec = otpSpec0.match(/^(OTP-|maint-)?([^ ]+)/)
let otpVersion
if (otpSpec[1]) {
if (otpSpec[1] && !isStrictVersion()) {
throw new Error(
`Requested Erlang/OTP version (${otpSpec0}) ` +
"should not contain 'OTP-'",
"should not contain 'OTP-, or maint-'",
)
}
if (otpSpec) {
@@ -169,7 +169,7 @@ async function getElixirVersion(exSpec0, otpVersion) {
const exSpec = exSpec0.match(/^v?(.+)(-otp-.+)/) || exSpec0.match(/^v?(.+)/)
let elixirVersion
if (exSpec[2]) {
if (exSpec[2] && !isStrictVersion()) {
throw new Error(
`Requested Elixir / Erlang/OTP version (${exSpec0} / ${otpVersion}) ` +
"should not contain '-otp-...'",
@@ -258,7 +258,7 @@ async function getOTPVersions(osVersion) {
.trim()
.split('\n')
.forEach((line) => {
const otpMatch = line.match(/^(OTP-)?([^ ]+)/)
const otpMatch = line.match(/^(OTP-|maint-)?([^ ]+)/)
const otpVersion = otpMatch[2]
otpVersions.set(otpVersion, otpMatch[0]) // we keep the original for later reference
})
@@ -335,13 +335,14 @@ async function getRebar3Versions() {
return rebar3VersionsListing
}
function isStrictVersion() {
return core.getInput('version-type', { required: false }) === 'strict'
}
function getVersionFromSpec(spec, versions) {
let version = null
if (
spec.match(/rc/) ||
core.getInput('version-type', { required: false }) === 'strict'
) {
if (spec.match(/rc/) || isStrictVersion()) {
version = spec
}
@@ -404,6 +405,7 @@ function getRunnerOSVersion() {
const ImageOSToContainer = {
ubuntu18: 'ubuntu-18.04',
ubuntu20: 'ubuntu-20.04',
ubuntu22: 'ubuntu-22.04',
win19: 'windows-2019',
win22: 'windows-2022',
}