mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-23 07:06:07 +00:00
Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a541161e4 | |||
| b8e9da70d1 | |||
| 6292fa4771 | |||
| 829ea8ebdc | |||
| 618f13887e | |||
| 90f5b2c068 | |||
| 73acf2617f | |||
| cb77d73385 | |||
| 2a23eb6a60 | |||
| f780b59067 | |||
| df8398692a | |||
| db0f43e56e | |||
| b5cdb7499d | |||
| ae6e9db1bf | |||
| cd1df4cd09 | |||
| 2f0cc07b4b | |||
| c36fc0ca1b | |||
| 7c4882bbdd | |||
| cdb7a12eb6 | |||
| 904c511e63 | |||
| 4f558159e6 | |||
| 0430fb6cc6 | |||
| 48f1d0ccc2 | |||
| 4ec4e80c33 | |||
| a23b1fc445 | |||
| eb31c4c998 | |||
| 726c8cb9ac | |||
| 951dd857ae | |||
| f2c1b65313 | |||
| 0352ab2e65 | |||
| 8b9cac4c04 | |||
| 6c8deb6007 | |||
| 98ca4dce66 | |||
| b8913643d6 | |||
| cf854bf149 | |||
| 4a641b1000 | |||
| 07193a0ba2 | |||
| 4c35984bbc |
@@ -1,7 +1,14 @@
|
|||||||
---
|
---
|
||||||
name: action
|
name: action
|
||||||
|
|
||||||
on: [push, workflow_dispatch]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "*"
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
@@ -12,7 +19,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Version it!
|
- name: Version it!
|
||||||
run: |
|
run: |
|
||||||
# We expect a string such as const setupBeamVersion = 'undefined' in the code
|
# We expect a string such as const setupBeamVersion = 'undefined' in the code
|
||||||
@@ -27,15 +34,16 @@ jobs:
|
|||||||
git add dist/index.js
|
git add dist/index.js
|
||||||
git commit -m "Automation: update setup-beam version output to ${SHA}"
|
git commit -m "Automation: update setup-beam version output to ${SHA}"
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|
||||||
check_integrity:
|
check_integrity:
|
||||||
name: Expected local npm actions
|
name: Expected local npm actions
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref != 'refs/heads/main'
|
if: github.ref != 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: '20'
|
||||||
- run: npm run build-dist
|
- run: npm run build-dist
|
||||||
- name: Check if build left artifacts
|
- name: Check if build left artifacts
|
||||||
run: git diff --exit-code --ignore-space-at-eol
|
run: git diff --exit-code --ignore-space-at-eol
|
||||||
@@ -44,10 +52,10 @@ jobs:
|
|||||||
name: Unit tests (Ubuntu)
|
name: Unit tests (Ubuntu)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: '20'
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm test
|
- run: npm test
|
||||||
- name: .tool-versions test
|
- name: .tool-versions test
|
||||||
@@ -61,9 +69,9 @@ jobs:
|
|||||||
name: Unit tests (Windows)
|
name: Unit tests (Windows)
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: '20'
|
||||||
- run: npm install --production
|
- run: npm install --production
|
||||||
- run: npm test
|
- run: npm test
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
---
|
---
|
||||||
name: hexpm-mirrors
|
name: hexpm-mirrors
|
||||||
|
|
||||||
on: [push, workflow_dispatch]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "*"
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-failing-first-mirror:
|
test-failing-first-mirror:
|
||||||
@@ -16,7 +23,7 @@ jobs:
|
|||||||
install-rebar: [true, false]
|
install-rebar: [true, false]
|
||||||
install-hex: [true, false]
|
install-hex: [true, false]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Use erlef/setup-beam
|
- name: Use erlef/setup-beam
|
||||||
id: setup-beam
|
id: setup-beam
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
---
|
---
|
||||||
name: ubuntu
|
name: ubuntu
|
||||||
|
|
||||||
on: [push, workflow_dispatch]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "*"
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
integration_test:
|
integration_test:
|
||||||
@@ -15,6 +22,10 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
combo:
|
combo:
|
||||||
|
- otp-version: '27'
|
||||||
|
elixir-version: 'v1.17.0-rc.0'
|
||||||
|
rebar3-version: '3.23'
|
||||||
|
os: 'ubuntu-latest'
|
||||||
- otp-version: '26.0'
|
- otp-version: '26.0'
|
||||||
elixir-version: 'v1.14-otp-25'
|
elixir-version: 'v1.14-otp-25'
|
||||||
os: 'ubuntu-latest'
|
os: 'ubuntu-latest'
|
||||||
@@ -30,12 +41,20 @@ jobs:
|
|||||||
elixir-version: '1.14.3'
|
elixir-version: '1.14.3'
|
||||||
os: 'ubuntu-latest'
|
os: 'ubuntu-latest'
|
||||||
version-type: 'strict'
|
version-type: 'strict'
|
||||||
|
- otp-version: '27'
|
||||||
|
os: 'ubuntu-24.04'
|
||||||
|
version-type: 'strict'
|
||||||
|
- otp-version: '26'
|
||||||
|
os: 'ubuntu-24.04'
|
||||||
|
version-type: 'strict'
|
||||||
- otp-version: '25'
|
- otp-version: '25'
|
||||||
elixir-version: '1'
|
os: 'ubuntu-24.04'
|
||||||
|
- otp-version: '25'
|
||||||
|
elixir-version: '1.16'
|
||||||
rebar3-version: '3'
|
rebar3-version: '3'
|
||||||
os: 'ubuntu-22.04'
|
os: 'ubuntu-22.04'
|
||||||
- otp-version: '24'
|
- otp-version: '24'
|
||||||
elixir-version: '1'
|
elixir-version: '1.16'
|
||||||
rebar3-version: '3'
|
rebar3-version: '3'
|
||||||
os: 'ubuntu-22.04'
|
os: 'ubuntu-22.04'
|
||||||
- otp-version: '25.0'
|
- otp-version: '25.0'
|
||||||
@@ -120,7 +139,7 @@ jobs:
|
|||||||
escript_script: 'protoc-gen-elixir --version'
|
escript_script: 'protoc-gen-elixir --version'
|
||||||
os: 'ubuntu-latest'
|
os: 'ubuntu-latest'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Use erlef/setup-beam
|
- name: Use erlef/setup-beam
|
||||||
id: setup-beam
|
id: setup-beam
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -174,6 +193,7 @@ jobs:
|
|||||||
mix escript.install --force ${{matrix.combo.escript_packages}}
|
mix escript.install --force ${{matrix.combo.escript_packages}}
|
||||||
${{matrix.combo.escript_script}}
|
${{matrix.combo.escript_script}}
|
||||||
if: ${{matrix.combo.escript_packages && matrix.combo.escript_script}}
|
if: ${{matrix.combo.escript_packages && matrix.combo.escript_script}}
|
||||||
|
|
||||||
environment_variables:
|
environment_variables:
|
||||||
name: Environment variables
|
name: Environment variables
|
||||||
runs-on: ${{matrix.combo.os}}
|
runs-on: ${{matrix.combo.os}}
|
||||||
@@ -187,7 +207,7 @@ jobs:
|
|||||||
rebar3-version: 'nightly'
|
rebar3-version: 'nightly'
|
||||||
os: 'ubuntu-latest'
|
os: 'ubuntu-latest'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Use erlef/setup-beam
|
- name: Use erlef/setup-beam
|
||||||
id: setup-beam
|
id: setup-beam
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -197,9 +217,9 @@ jobs:
|
|||||||
gleam-version: ${{matrix.combo.gleam-version}}
|
gleam-version: ${{matrix.combo.gleam-version}}
|
||||||
rebar3-version: ${{matrix.combo.rebar3-version}}
|
rebar3-version: ${{matrix.combo.rebar3-version}}
|
||||||
- run: env
|
- run: env
|
||||||
- name: List environment variables
|
- name: Check environment variables
|
||||||
run: |
|
run: |
|
||||||
[ -n "${INSTALL_DIR_FOR_ELIXIR}" ] && echo "${INSTALL_DIR_FOR_ELIXIR}"
|
${INSTALL_DIR_FOR_ELIXIR}/bin/elixir -v
|
||||||
[ -n "${INSTALL_DIR_FOR_GLEAM}" ] && echo "${INSTALL_DIR_FOR_GLEAM}"
|
${INSTALL_DIR_FOR_GLEAM}/bin/gleam --version
|
||||||
[ -n "${INSTALL_DIR_FOR_OTP}" ] && echo "${INSTALL_DIR_FOR_OTP}"
|
${INSTALL_DIR_FOR_OTP}/bin/erl -version
|
||||||
[ -n "${INSTALL_DIR_FOR_REBAR3}" ] && echo "${INSTALL_DIR_FOR_REBAR3}"
|
${INSTALL_DIR_FOR_REBAR3}/bin/rebar3 version
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ jobs:
|
|||||||
name: Update 3rd party licenses
|
name: Update 3rd party licenses
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- run:
|
- run:
|
||||||
./.github/workflows/update_3rd_party_licenses.sh
|
./.github/workflows/update_3rd_party_licenses.sh
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
---
|
---
|
||||||
name: windows
|
name: windows
|
||||||
|
|
||||||
on: [push, workflow_dispatch]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "*"
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
integration_test:
|
integration_test:
|
||||||
@@ -15,6 +22,10 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
combo:
|
combo:
|
||||||
|
- otp-version: '27'
|
||||||
|
elixir-version: 'v1.17.0-rc.0'
|
||||||
|
rebar3-version: '3.23'
|
||||||
|
os: 'windows-latest'
|
||||||
- otp-version: '26.0'
|
- otp-version: '26.0'
|
||||||
elixir-version: 'main'
|
elixir-version: 'main'
|
||||||
os: 'windows-latest'
|
os: 'windows-latest'
|
||||||
@@ -59,7 +70,7 @@ jobs:
|
|||||||
escript_script: 'protoc-gen-elixir --version'
|
escript_script: 'protoc-gen-elixir --version'
|
||||||
os: 'windows-latest'
|
os: 'windows-latest'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Use erlef/setup-beam
|
- name: Use erlef/setup-beam
|
||||||
id: setup-beam
|
id: setup-beam
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -112,6 +123,7 @@ jobs:
|
|||||||
mix escript.install --force ${{matrix.combo.escript_packages}}
|
mix escript.install --force ${{matrix.combo.escript_packages}}
|
||||||
${{matrix.combo.escript_script}}
|
${{matrix.combo.escript_script}}
|
||||||
if: ${{matrix.combo.escript_packages && matrix.combo.escript_script}}
|
if: ${{matrix.combo.escript_packages && matrix.combo.escript_script}}
|
||||||
|
|
||||||
environment_variables:
|
environment_variables:
|
||||||
name: Environment variables
|
name: Environment variables
|
||||||
runs-on: ${{matrix.combo.os}}
|
runs-on: ${{matrix.combo.os}}
|
||||||
@@ -125,7 +137,7 @@ jobs:
|
|||||||
rebar3-version: 'nightly'
|
rebar3-version: 'nightly'
|
||||||
os: 'windows-latest'
|
os: 'windows-latest'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Use erlef/setup-beam
|
- name: Use erlef/setup-beam
|
||||||
id: setup-beam
|
id: setup-beam
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -135,10 +147,10 @@ jobs:
|
|||||||
gleam-version: ${{matrix.combo.gleam-version}}
|
gleam-version: ${{matrix.combo.gleam-version}}
|
||||||
rebar3-version: ${{matrix.combo.rebar3-version}}
|
rebar3-version: ${{matrix.combo.rebar3-version}}
|
||||||
- run: env
|
- run: env
|
||||||
- name: List environment variables
|
- name: Check environment variables
|
||||||
run: |
|
run: |
|
||||||
[ -n "${INSTALL_DIR_FOR_ELIXIR}" ] && echo "${INSTALL_DIR_FOR_ELIXIR}"
|
& "$Env:INSTALL_DIR_FOR_ELIXIR/bin/elixir" "-v"
|
||||||
[ -n "${INSTALL_DIR_FOR_GLEAM}" ] && echo "${INSTALL_DIR_FOR_GLEAM}"
|
& "$Env:INSTALL_DIR_FOR_GLEAM/bin/gleam.exe" "--version"
|
||||||
[ -n "${INSTALL_DIR_FOR_OTP}" ] && echo "${INSTALL_DIR_FOR_OTP}"
|
& "$Env:INSTALL_DIR_FOR_OTP/bin/erl.exe" "+V"
|
||||||
[ -n "${INSTALL_DIR_FOR_REBAR3}" ] && echo "${INSTALL_DIR_FOR_REBAR3}"
|
& "$Env:INSTALL_DIR_FOR_REBAR3/bin/rebar3.cmd" "version"
|
||||||
shell: bash
|
& "$Env:INSTALL_DIR_FOR_REBAR3/bin/rebar3.ps1" "version"
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
node_modules/**
|
node_modules/**
|
||||||
dist/.github/workflows
|
|
||||||
test/.tool-versions
|
test/.tool-versions
|
||||||
|
|||||||
+56
-56
@@ -2,32 +2,6 @@ THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY B
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
The following software may be included in this product: @aashutoshrathi/word-wrap, is-extglob. A copy of the source code may be downloaded from git+https://github.com/aashutoshrathi/word-wrap.git (@aashutoshrathi/word-wrap), https://github.com/jonschlinkert/is-extglob.git (is-extglob). This software contains the following license and notice below:
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014-2016, Jon Schlinkert
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
-----
|
|
||||||
|
|
||||||
The following software may be included in this product: @actions/core, @actions/exec, @actions/io, @actions/tool-cache. A copy of the source code may be downloaded from git+https://github.com/actions/toolkit.git (@actions/core), git+https://github.com/actions/toolkit.git (@actions/exec), git+https://github.com/actions/toolkit.git (@actions/io), git+https://github.com/actions/toolkit.git (@actions/tool-cache). This software contains the following license and notice below:
|
The following software may be included in this product: @actions/core, @actions/exec, @actions/io, @actions/tool-cache. A copy of the source code may be downloaded from git+https://github.com/actions/toolkit.git (@actions/core), git+https://github.com/actions/toolkit.git (@actions/exec), git+https://github.com/actions/toolkit.git (@actions/io), git+https://github.com/actions/toolkit.git (@actions/tool-cache). This software contains the following license and notice below:
|
||||||
|
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
@@ -118,7 +92,7 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
The following software may be included in this product: @fastify/busboy. A copy of the source code may be downloaded from https://github.com/fastify/busboy.git. This software contains the following license and notice below:
|
The following software may be included in this product: @fastify/busboy. A copy of the source code may be downloaded from git+https://github.com/fastify/busboy.git. This software contains the following license and notice below:
|
||||||
|
|
||||||
Copyright Brian White. All rights reserved.
|
Copyright Brian White. All rights reserved.
|
||||||
|
|
||||||
@@ -935,11 +909,11 @@ SOFTWARE.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
The following software may be included in this product: braces. A copy of the source code may be downloaded from https://github.com/micromatch/braces.git. This software contains the following license and notice below:
|
The following software may be included in this product: braces, fill-range, is-number, micromatch. A copy of the source code may be downloaded from https://github.com/micromatch/braces.git (braces), https://github.com/jonschlinkert/fill-range.git (fill-range), https://github.com/jonschlinkert/is-number.git (is-number), https://github.com/micromatch/micromatch.git (micromatch). This software contains the following license and notice below:
|
||||||
|
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2014-2018, Jon Schlinkert.
|
Copyright (c) 2014-present, Jon Schlinkert.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -1566,6 +1540,32 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
The following software may be included in this product: es-define-property, es-errors. A copy of the source code may be downloaded from git+https://github.com/ljharb/es-define-property.git (es-define-property), git+https://github.com/ljharb/es-errors.git (es-errors). This software contains the following license and notice below:
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 Jordan Harband
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
The following software may be included in this product: es6-error. A copy of the source code may be downloaded from https://github.com/bjyoungblood/es6-error.git. This software contains the following license and notice below:
|
The following software may be included in this product: es6-error. A copy of the source code may be downloaded from https://github.com/bjyoungblood/es6-error.git. This software contains the following license and notice below:
|
||||||
|
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
@@ -2099,32 +2099,6 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
The following software may be included in this product: fill-range, is-number, micromatch. A copy of the source code may be downloaded from https://github.com/jonschlinkert/fill-range.git (fill-range), https://github.com/jonschlinkert/is-number.git (is-number), https://github.com/micromatch/micromatch.git (micromatch). This software contains the following license and notice below:
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014-present, Jon Schlinkert.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
-----
|
|
||||||
|
|
||||||
The following software may be included in this product: flat-cache. A copy of the source code may be downloaded from https://github.com/jaredwray/flat-cache.git. This software contains the following license and notice below:
|
The following software may be included in this product: flat-cache. A copy of the source code may be downloaded from https://github.com/jaredwray/flat-cache.git. This software contains the following license and notice below:
|
||||||
|
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
@@ -2670,7 +2644,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
The following software may be included in this product: ini, isexe, json-stringify-safe, lru-cache, minimatch, once, rimraf, semver, which, wrappy, yallist. A copy of the source code may be downloaded from git://github.com/isaacs/ini.git (ini), git+https://github.com/isaacs/isexe.git (isexe), git://github.com/isaacs/json-stringify-safe (json-stringify-safe), git://github.com/isaacs/node-lru-cache.git (lru-cache), git://github.com/isaacs/minimatch.git (minimatch), git://github.com/isaacs/once (once), git://github.com/isaacs/rimraf.git (rimraf), https://github.com/npm/node-semver.git (semver), git://github.com/isaacs/node-which.git (which), https://github.com/npm/wrappy (wrappy), git+https://github.com/isaacs/yallist.git (yallist). This software contains the following license and notice below:
|
The following software may be included in this product: ini, isexe, json-stringify-safe, lru-cache, minimatch, once, rimraf, semver, which, wrappy, yallist. A copy of the source code may be downloaded from git://github.com/isaacs/ini.git (ini), git+https://github.com/isaacs/isexe.git (isexe), git://github.com/isaacs/json-stringify-safe (json-stringify-safe), git://github.com/isaacs/node-lru-cache.git (lru-cache), git://github.com/isaacs/minimatch.git (minimatch), git://github.com/isaacs/once (once), git://github.com/isaacs/rimraf.git (rimraf), git+https://github.com/npm/node-semver.git (semver), git://github.com/isaacs/node-which.git (which), https://github.com/npm/wrappy (wrappy), git+https://github.com/isaacs/yallist.git (yallist). This software contains the following license and notice below:
|
||||||
|
|
||||||
The ISC License
|
The ISC License
|
||||||
|
|
||||||
@@ -2690,6 +2664,32 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
The following software may be included in this product: is-extglob, word-wrap. A copy of the source code may be downloaded from https://github.com/jonschlinkert/is-extglob.git (is-extglob), https://github.com/jonschlinkert/word-wrap.git (word-wrap). This software contains the following license and notice below:
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2014-2016, Jon Schlinkert
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
The following software may be included in this product: is-glob. A copy of the source code may be downloaded from https://github.com/micromatch/is-glob.git. This software contains the following license and notice below:
|
The following software may be included in this product: is-glob. A copy of the source code may be downloaded from https://github.com/micromatch/is-glob.git. This software contains the following license and notice below:
|
||||||
|
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ Here are a few things you can do that will increase the likelihood of your pull
|
|||||||
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
|
- 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
|
- Execute `npm run build-dist` and fix any issues arising from that
|
||||||
|
|
||||||
|
## Running tests
|
||||||
|
|
||||||
|
When running tests locally, a valid classic GitHub token with the `repo` scope is required for tests to pass.
|
||||||
|
|
||||||
|
- Export the token in the current shell: `export GITHUB_TOKEN=<contents>`
|
||||||
|
- Run tests `npm test`
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
|
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
|
||||||
|
|||||||
@@ -51,11 +51,12 @@ and Erlang/OTP.
|
|||||||
|
|
||||||
| Operating system | Erlang/OTP | Status
|
| Operating system | Erlang/OTP | Status
|
||||||
|- |- |-
|
|- |- |-
|
||||||
| ubuntu-18.04 | 17 - 25 | ✅
|
| ubuntu-18.04 | 17.0 - 25.3 | ✅
|
||||||
| ubuntu-20.04 | 20 - 25 | ✅
|
| ubuntu-20.04 | 20.0 - 27 | ✅
|
||||||
| ubuntu-22.04 | 24.2 - 25 | ✅
|
| ubuntu-22.04 | 24.2 - 27 | ✅
|
||||||
|
| ubuntu-24.04 | 24.3 - 27 | ✅
|
||||||
| windows-2019 | 21* - 25 | ✅
|
| windows-2019 | 21* - 25 | ✅
|
||||||
| windows-2022 | 21* - 25 | ✅
|
| windows-2022 | 21* - 27 | ✅
|
||||||
|
|
||||||
**Note** *: prior to 23, Windows builds are only available for minor versions, e.g. 21.0, 21.3, 22.0, etc.
|
**Note** *: prior to 23, Windows builds are only available for minor versions, e.g. 21.0, 21.3, 22.0, etc.
|
||||||
|
|
||||||
@@ -69,6 +70,7 @@ uses that to download assets:
|
|||||||
| ubuntu18 | ubuntu-18.04
|
| ubuntu18 | ubuntu-18.04
|
||||||
| ubuntu20 | ubuntu-20.04
|
| ubuntu20 | ubuntu-20.04
|
||||||
| ubuntu22 | ubuntu-22.04
|
| ubuntu22 | ubuntu-22.04
|
||||||
|
| ubuntu24 | ubuntu-24.04
|
||||||
| win19 | windows-2019
|
| win19 | windows-2019
|
||||||
| win22 | windows-2022
|
| win22 | windows-2022
|
||||||
|
|
||||||
@@ -83,7 +85,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
ImageOS: ubuntu20 # equivalent to runs-on ubuntu-20.04
|
ImageOS: ubuntu20 # equivalent to runs-on ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: erlef/setup-beam@v1
|
- uses: erlef/setup-beam@v1
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
@@ -122,11 +124,11 @@ with the following correspondence.
|
|||||||
#### `.tool-versions` format
|
#### `.tool-versions` format
|
||||||
|
|
||||||
| YML | `.tool-versions` |
|
| YML | `.tool-versions` |
|
||||||
|- |-
|
|- |- |
|
||||||
| `otp-version` | `erlang`
|
| `otp-version` | `erlang` |
|
||||||
| `elixir-version` | `elixir`
|
| `elixir-version` | `elixir` |
|
||||||
| `gleam-version` | `gleam`
|
| `gleam-version` | `gleam` |
|
||||||
| `rebar3-version` | `rebar`
|
| `rebar3-version` | `rebar` |
|
||||||
|
|
||||||
### Example (Erlang/OTP + Elixir, on Ubuntu)
|
### Example (Erlang/OTP + Elixir, on Ubuntu)
|
||||||
|
|
||||||
@@ -143,7 +145,7 @@ jobs:
|
|||||||
otp: ['20.3', '21.3', '22.2']
|
otp: ['20.3', '21.3', '22.2']
|
||||||
elixir: ['1.8.2', '1.9.4']
|
elixir: ['1.8.2', '1.9.4']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: erlef/setup-beam@v1
|
- uses: erlef/setup-beam@v1
|
||||||
with:
|
with:
|
||||||
otp-version: ${{matrix.otp}}
|
otp-version: ${{matrix.otp}}
|
||||||
@@ -167,7 +169,7 @@ jobs:
|
|||||||
otp: ['20.3', '21.3', '22.2']
|
otp: ['20.3', '21.3', '22.2']
|
||||||
rebar3: ['3.14.1', '3.14.3']
|
rebar3: ['3.14.1', '3.14.3']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: erlef/setup-beam@v1
|
- uses: erlef/setup-beam@v1
|
||||||
with:
|
with:
|
||||||
otp-version: ${{matrix.otp}}
|
otp-version: ${{matrix.otp}}
|
||||||
@@ -185,7 +187,7 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: erlef/setup-beam@v1
|
- uses: erlef/setup-beam@v1
|
||||||
with:
|
with:
|
||||||
otp-version: '24'
|
otp-version: '24'
|
||||||
@@ -203,7 +205,7 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: erlef/setup-beam@v1
|
- uses: erlef/setup-beam@v1
|
||||||
with:
|
with:
|
||||||
otp-version: '24'
|
otp-version: '24'
|
||||||
@@ -221,7 +223,7 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: erlef/setup-beam@v1
|
- uses: erlef/setup-beam@v1
|
||||||
with:
|
with:
|
||||||
otp-version: false
|
otp-version: false
|
||||||
@@ -245,10 +247,10 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- uses: erlef/setup-beam@v1
|
- uses: erlef/setup-beam@v1
|
||||||
with:
|
with:
|
||||||
otp-version: '25'
|
otp-version: '26'
|
||||||
# Use `cdn.jsdelivr.net/hex` as an alternative to `builds.hex.pm`
|
# Use `cdn.jsdelivr.net/hex` as an alternative to `builds.hex.pm`
|
||||||
hexpm-mirrors: https://cdn.jsdelivr.net/hex
|
hexpm-mirrors: https://cdn.jsdelivr.net/hex
|
||||||
```
|
```
|
||||||
@@ -263,10 +265,10 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- uses: erlef/setup-beam@v1
|
- uses: erlef/setup-beam@v1
|
||||||
with:
|
with:
|
||||||
otp-version: '25'
|
otp-version: '26'
|
||||||
hexpm-mirrors: |
|
hexpm-mirrors: |
|
||||||
https://builds.hex.pm
|
https://builds.hex.pm
|
||||||
https://cdn.jsdelivr.net/hex
|
https://cdn.jsdelivr.net/hex
|
||||||
@@ -282,6 +284,9 @@ environment variables:
|
|||||||
- `INSTALL_DIR_FOR_GLEAM`: base folder for Gleam
|
- `INSTALL_DIR_FOR_GLEAM`: base folder for Gleam
|
||||||
- `INSTALL_DIR_FOR_REBAR3`: base folder for `rebar3`
|
- `INSTALL_DIR_FOR_REBAR3`: base folder for `rebar3`
|
||||||
|
|
||||||
|
In each of these you'll find folder `bin` where the appropriate binaries, platform-dependant,
|
||||||
|
are found (i.e. `erl`, `erl.exe`, `rebar3`, `rebar3.exe`, ...).
|
||||||
|
|
||||||
## Elixir Problem Matchers
|
## Elixir Problem Matchers
|
||||||
|
|
||||||
The Elixir Problem Matchers in this repository are adapted from
|
The Elixir Problem Matchers in this repository are adapted from
|
||||||
|
|||||||
+1
-1
@@ -61,5 +61,5 @@ outputs:
|
|||||||
setup-beam-version:
|
setup-beam-version:
|
||||||
description: The commit unique id of the execution action version
|
description: The commit unique id of the execution action version
|
||||||
runs:
|
runs:
|
||||||
using: node16
|
using: node20
|
||||||
main: dist/index.js
|
main: dist/index.js
|
||||||
|
|||||||
Vendored
-62
@@ -1,62 +0,0 @@
|
|||||||
{
|
|
||||||
"problemMatcher": [
|
|
||||||
{
|
|
||||||
"owner": "elixir-mixCompileError",
|
|
||||||
"severity": "error",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^\\*\\* \\((\\w+)\\) (.*):(\\d+): (.*)$",
|
|
||||||
"file": 2,
|
|
||||||
"line": 3,
|
|
||||||
"message": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"owner": "elixir-mixCompileWarning",
|
|
||||||
"severity": "warning",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^warning: (.*)$",
|
|
||||||
"message": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"regexp": "^ (.*):(\\d+).*$",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"owner": "elixir-mixTestFailure",
|
|
||||||
"severity": "error",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^\\s*\\d+\\) (.*)$",
|
|
||||||
"message": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"regexp": "^\\s*(.*):(\\d+)$",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"owner": "elixir-credoOutputDefault",
|
|
||||||
"severity": "warning",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^\u2503\\s\\[\\w\\]\\s[\u2191|\u2197|\u2192|\u2198|\u2193]\\s(.*)$",
|
|
||||||
"message": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"regexp": "^\u2503\\s{7}(.*):(\\d+):(\\d+)\\s.*$",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2,
|
|
||||||
"column": 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Vendored
+473
-441
File diff suppressed because it is too large
Load Diff
Vendored
-37
@@ -1,37 +0,0 @@
|
|||||||
param([Parameter(Mandatory=$true)][string]${VSN})
|
|
||||||
|
|
||||||
$ErrorActionPreference="Stop"
|
|
||||||
|
|
||||||
Set-Location ${Env:RUNNER_TEMP}
|
|
||||||
|
|
||||||
$FILE_OUTPUT="gleam.zip"
|
|
||||||
$DIR_FOR_BIN=".setup-beam/gleam"
|
|
||||||
|
|
||||||
function Version-Greater-Than([string]${THIS_ONE}, [string]${REFERENCE}) {
|
|
||||||
$THIS_ONE=$THIS_ONE.replace('v', '')
|
|
||||||
$THIS_ONE=$THIS_ONE.replace('rc', '')
|
|
||||||
$THIS_ONE=$THIS_ONE.replace('-', '')
|
|
||||||
return [version]${THIS_ONE} -gt [version]${REFERENCE}
|
|
||||||
}
|
|
||||||
|
|
||||||
function Uses-LLVM-Triplets([string]${THIS_VSN}) {
|
|
||||||
return "${THIS_VSN}" -eq "nightly" -or (Version-Greater-Than "${THIS_VSN}" "0.22.1")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Uses-LLVM-Triplets "$VSN") {
|
|
||||||
$FILE_INPUT="gleam-${VSN}-x86_64-pc-windows-msvc.zip"
|
|
||||||
} else {
|
|
||||||
$FILE_INPUT="gleam-${VSN}-windows-64bit.zip"
|
|
||||||
}
|
|
||||||
|
|
||||||
$ProgressPreference="SilentlyContinue"
|
|
||||||
Invoke-WebRequest "https://github.com/gleam-lang/gleam/releases/download/${VSN}/${FILE_INPUT}" -OutFile "${FILE_OUTPUT}"
|
|
||||||
$ProgressPreference="Continue"
|
|
||||||
New-Item "${DIR_FOR_BIN}/bin" -ItemType Directory | Out-Null
|
|
||||||
$ProgressPreference="SilentlyContinue"
|
|
||||||
Expand-Archive -DestinationPath "${DIR_FOR_BIN}/bin" -Path "${FILE_OUTPUT}"
|
|
||||||
$ProgressPreference="Continue"
|
|
||||||
Write-Output "Installed Gleam version follows"
|
|
||||||
& "${DIR_FOR_BIN}/bin/gleam" "--version" | Write-Output
|
|
||||||
|
|
||||||
"INSTALL_DIR_FOR_GLEAM=${Env:RUNNER_TEMP}/${DIR_FOR_BIN}" | Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
|
|
||||||
Vendored
-35
@@ -1,35 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -eo pipefail
|
|
||||||
|
|
||||||
cd "${RUNNER_TEMP}"
|
|
||||||
|
|
||||||
VSN="$1"
|
|
||||||
FILE_OUTPUT=gleam.tar.gz
|
|
||||||
DIR_FOR_BIN=.setup-beam/gleam
|
|
||||||
|
|
||||||
version_gt() {
|
|
||||||
REFERENCE=$1
|
|
||||||
test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$REFERENCE"
|
|
||||||
}
|
|
||||||
|
|
||||||
uses_llvm_triplets() {
|
|
||||||
local VERSION="$1"
|
|
||||||
test "${VERSION}" = "nightly" || version_gt "${VERSION}" "v0.22.1"
|
|
||||||
}
|
|
||||||
|
|
||||||
if uses_llvm_triplets "$VSN"
|
|
||||||
then
|
|
||||||
FILE_INPUT="gleam-${VSN}-x86_64-unknown-linux-musl.tar.gz"
|
|
||||||
else
|
|
||||||
FILE_INPUT="gleam-${VSN}-linux-amd64.tar.gz"
|
|
||||||
fi
|
|
||||||
|
|
||||||
wget -q -O "${FILE_OUTPUT}" "https://github.com/gleam-lang/gleam/releases/download/${VSN}/${FILE_INPUT}"
|
|
||||||
mkdir -p "${DIR_FOR_BIN}/bin"
|
|
||||||
tar zxf "${FILE_OUTPUT}" -C "${DIR_FOR_BIN}/bin"
|
|
||||||
|
|
||||||
echo "Installed Gleam version follows"
|
|
||||||
${DIR_FOR_BIN}/bin/gleam --version
|
|
||||||
|
|
||||||
echo "INSTALL_DIR_FOR_GLEAM=${RUNNER_TEMP}/${DIR_FOR_BIN}" >> "${GITHUB_ENV}"
|
|
||||||
Vendored
-32
@@ -1,32 +0,0 @@
|
|||||||
param([Parameter(Mandatory=$true)][string]${VSN})
|
|
||||||
|
|
||||||
$ErrorActionPreference="Stop"
|
|
||||||
|
|
||||||
Set-Location ${Env:RUNNER_TEMP}
|
|
||||||
|
|
||||||
$FILE_INPUT="rebar3"
|
|
||||||
$FILE_OUTPUT="rebar3"
|
|
||||||
$FILE_OUTPUT_PS1="rebar3.ps1"
|
|
||||||
$FILE_OUTPUT_CMD="rebar3.cmd"
|
|
||||||
$DIR_FOR_BIN=".setup-beam/rebar3"
|
|
||||||
|
|
||||||
$ProgressPreference="SilentlyContinue"
|
|
||||||
$REBAR3_TARGET="https://github.com/erlang/rebar3/releases/download/${VSN}/${FILE_INPUT}"
|
|
||||||
$REBAR3_NIGHTLY=""
|
|
||||||
If ( ${VSN} -eq "nightly" )
|
|
||||||
{
|
|
||||||
$REBAR3_TARGET="https://s3.amazonaws.com/rebar3-nightly/rebar3"
|
|
||||||
$REBAR3_NIGHTLY=" (from nightly build)"
|
|
||||||
}
|
|
||||||
Invoke-WebRequest "${REBAR3_TARGET}" -OutFile "${FILE_OUTPUT}"
|
|
||||||
$ProgressPreference="Continue"
|
|
||||||
New-Item "${DIR_FOR_BIN}/bin" -ItemType Directory | Out-Null
|
|
||||||
Move-Item "${FILE_OUTPUT}" "${DIR_FOR_BIN}/bin"
|
|
||||||
Write-Output "& escript.exe ${PWD}/${DIR_FOR_BIN}/bin/${FILE_OUTPUT} `${args}" | Out-File -FilePath "${FILE_OUTPUT_PS1}" -Encoding utf8 -Append
|
|
||||||
Write-Output "@echo off`r`nescript.exe ${PWD}/${DIR_FOR_BIN}/bin/${FILE_OUTPUT} %*" | Out-File -FilePath "${FILE_OUTPUT_CMD}" -Encoding utf8 -Append
|
|
||||||
Move-Item "${FILE_OUTPUT_PS1}" "${DIR_FOR_BIN}/bin"
|
|
||||||
Move-Item "${FILE_OUTPUT_CMD}" "${DIR_FOR_BIN}/bin"
|
|
||||||
Write-Output "Installed rebar3 version${REBAR3_NIGHTLY} follows"
|
|
||||||
& "${DIR_FOR_BIN}/bin/rebar3.cmd" "version" | Write-Output
|
|
||||||
|
|
||||||
"INSTALL_DIR_FOR_REBAR3=${Env:RUNNER_TEMP}/${DIR_FOR_BIN}" | Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
|
|
||||||
Vendored
-25
@@ -1,25 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -eo pipefail
|
|
||||||
|
|
||||||
cd "${RUNNER_TEMP}"
|
|
||||||
|
|
||||||
VSN=${1}
|
|
||||||
FILE_INPUT=rebar3
|
|
||||||
FILE_OUTPUT=rebar3
|
|
||||||
DIR_FOR_BIN=.setup-beam/rebar3
|
|
||||||
|
|
||||||
REBAR3_TARGET="https://github.com/erlang/rebar3/releases/download/${VSN}/${FILE_INPUT}"
|
|
||||||
REBAR3_NIGHTLY=""
|
|
||||||
if [ "${VSN}" == "nightly" ]; then
|
|
||||||
REBAR3_TARGET="https://s3.amazonaws.com/rebar3-nightly/rebar3"
|
|
||||||
REBAR3_NIGHTLY=" (from nightly build)"
|
|
||||||
fi
|
|
||||||
wget -q -O "${FILE_OUTPUT}" "${REBAR3_TARGET}"
|
|
||||||
mkdir -p "${DIR_FOR_BIN}/bin"
|
|
||||||
chmod +x "${FILE_OUTPUT}"
|
|
||||||
mv "${FILE_OUTPUT}" "${DIR_FOR_BIN}/bin"
|
|
||||||
echo "Installed rebar3 version${REBAR3_NIGHTLY} follows"
|
|
||||||
${DIR_FOR_BIN}/bin/rebar3 version
|
|
||||||
|
|
||||||
echo "INSTALL_DIR_FOR_REBAR3=${RUNNER_TEMP}/${DIR_FOR_BIN}" >> "${GITHUB_ENV}"
|
|
||||||
Generated
+516
-343
File diff suppressed because it is too large
Load Diff
+4
-2
@@ -11,7 +11,9 @@
|
|||||||
"shellcheck": "shellcheck .github/workflows/*.sh",
|
"shellcheck": "shellcheck .github/workflows/*.sh",
|
||||||
"test": "node test/setup-beam.test.js",
|
"test": "node test/setup-beam.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"
|
"clean-dist": "rm -rf ./dist",
|
||||||
|
"lint": "npm run markdownlint && npm run shellcheck && npm run yamllint && npm run jslint",
|
||||||
|
"build-dist": "npm run clean-dist && npm install && npm run build && npm run format && npm run lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "1.10.0",
|
"@actions/core": "1.10.0",
|
||||||
@@ -30,6 +32,6 @@
|
|||||||
"yarn": "1.22.19"
|
"yarn": "1.22.19"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=20"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+43
-22
@@ -49,7 +49,7 @@ async function main() {
|
|||||||
await maybeInstallRebar3(rebar3Spec)
|
await maybeInstallRebar3(rebar3Spec)
|
||||||
|
|
||||||
// undefined is replaced by a function, post- main branch merge
|
// undefined is replaced by a function, post- main branch merge
|
||||||
const setupBeamVersion = 'bc84950'
|
const setupBeamVersion = 'b8e9da7'
|
||||||
core.setOutput('setup-beam-version', setupBeamVersion)
|
core.setOutput('setup-beam-version', setupBeamVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,7 +135,6 @@ async function maybeInstallGleam(gleamSpec) {
|
|||||||
core.startGroup(`Installing Gleam ${gleamVersion}`)
|
core.startGroup(`Installing Gleam ${gleamVersion}`)
|
||||||
await install('gleam', { toolVersion: gleamVersion })
|
await install('gleam', { toolVersion: gleamVersion })
|
||||||
core.setOutput('gleam-version', gleamVersion)
|
core.setOutput('gleam-version', gleamVersion)
|
||||||
core.addPath(`${process.env.RUNNER_TEMP}/.setup-beam/gleam/bin`)
|
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
|
|
||||||
installed = true
|
installed = true
|
||||||
@@ -156,7 +155,6 @@ async function maybeInstallRebar3(rebar3Spec) {
|
|||||||
core.startGroup(`Installing rebar3 ${rebar3Version}`)
|
core.startGroup(`Installing rebar3 ${rebar3Version}`)
|
||||||
await install('rebar3', { toolVersion: rebar3Version })
|
await install('rebar3', { toolVersion: rebar3Version })
|
||||||
core.setOutput('rebar3-version', rebar3Version)
|
core.setOutput('rebar3-version', rebar3Version)
|
||||||
core.addPath(`${process.env.RUNNER_TEMP}/.setup-beam/rebar3/bin`)
|
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
|
|
||||||
installed = true
|
installed = true
|
||||||
@@ -485,6 +483,7 @@ function getRunnerOSVersion() {
|
|||||||
ubuntu18: 'ubuntu-18.04',
|
ubuntu18: 'ubuntu-18.04',
|
||||||
ubuntu20: 'ubuntu-20.04',
|
ubuntu20: 'ubuntu-20.04',
|
||||||
ubuntu22: 'ubuntu-22.04',
|
ubuntu22: 'ubuntu-22.04',
|
||||||
|
ubuntu24: 'ubuntu-24.04',
|
||||||
win19: 'windows-2019',
|
win19: 'windows-2019',
|
||||||
win22: 'windows-2022',
|
win22: 'windows-2022',
|
||||||
}
|
}
|
||||||
@@ -593,7 +592,7 @@ alongside ${alternativeName}=${alternativeValue} \
|
|||||||
}
|
}
|
||||||
|
|
||||||
function parseVersionFile(versionFilePath0) {
|
function parseVersionFile(versionFilePath0) {
|
||||||
const versionFilePath = path.join(
|
const versionFilePath = path.resolve(
|
||||||
process.env.GITHUB_WORKSPACE,
|
process.env.GITHUB_WORKSPACE,
|
||||||
versionFilePath0,
|
versionFilePath0,
|
||||||
)
|
)
|
||||||
@@ -733,8 +732,9 @@ async function install(toolName, opts) {
|
|||||||
reportVersion: () => {
|
reportVersion: () => {
|
||||||
const cmd = 'erl'
|
const cmd = 'erl'
|
||||||
const args = ['-version']
|
const args = ['-version']
|
||||||
|
const env = {}
|
||||||
|
|
||||||
return [cmd, args]
|
return [cmd, args, env]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
win32: {
|
win32: {
|
||||||
@@ -750,8 +750,9 @@ async function install(toolName, opts) {
|
|||||||
reportVersion: () => {
|
reportVersion: () => {
|
||||||
const cmd = 'erl.exe'
|
const cmd = 'erl.exe'
|
||||||
const args = ['+V']
|
const args = ['+V']
|
||||||
|
const env = {}
|
||||||
|
|
||||||
return [cmd, args]
|
return [cmd, args, env]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -779,8 +780,9 @@ async function install(toolName, opts) {
|
|||||||
reportVersion: () => {
|
reportVersion: () => {
|
||||||
const cmd = 'elixir'
|
const cmd = 'elixir'
|
||||||
const args = ['-v']
|
const args = ['-v']
|
||||||
|
const env = {}
|
||||||
|
|
||||||
return [cmd, args]
|
return [cmd, args, env]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -819,8 +821,9 @@ async function install(toolName, opts) {
|
|||||||
reportVersion: () => {
|
reportVersion: () => {
|
||||||
const cmd = 'gleam'
|
const cmd = 'gleam'
|
||||||
const args = ['--version']
|
const args = ['--version']
|
||||||
|
const env = {}
|
||||||
|
|
||||||
return [cmd, args]
|
return [cmd, args, env]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
win32: {
|
win32: {
|
||||||
@@ -852,8 +855,9 @@ async function install(toolName, opts) {
|
|||||||
reportVersion: () => {
|
reportVersion: () => {
|
||||||
const cmd = 'gleam.exe'
|
const cmd = 'gleam.exe'
|
||||||
const args = ['--version']
|
const args = ['--version']
|
||||||
|
const env = {}
|
||||||
|
|
||||||
return [cmd, args]
|
return [cmd, args, env]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -884,8 +888,12 @@ async function install(toolName, opts) {
|
|||||||
reportVersion: () => {
|
reportVersion: () => {
|
||||||
const cmd = 'rebar3'
|
const cmd = 'rebar3'
|
||||||
const args = ['version']
|
const args = ['version']
|
||||||
|
const env = {
|
||||||
|
REBAR_GLOBAL_CONFIG_DIR: '/fake-dir',
|
||||||
|
REBAR_CONFIG: 'fake.config',
|
||||||
|
}
|
||||||
|
|
||||||
return [cmd, args]
|
return [cmd, args, env]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
win32: {
|
win32: {
|
||||||
@@ -903,23 +911,26 @@ async function install(toolName, opts) {
|
|||||||
postExtract: async (cachePath) => {
|
postExtract: async (cachePath) => {
|
||||||
const bindir = path.join(cachePath, 'bin')
|
const bindir = path.join(cachePath, 'bin')
|
||||||
const oldPath = path.join(cachePath, 'rebar3')
|
const oldPath = path.join(cachePath, 'rebar3')
|
||||||
|
const newPath = path.join(bindir, 'rebar3')
|
||||||
fs.mkdirSync(bindir)
|
fs.mkdirSync(bindir)
|
||||||
fs.chmodSync(oldPath, 0o755)
|
fs.renameSync(oldPath, newPath)
|
||||||
|
fs.chmodSync(newPath, 0o755)
|
||||||
|
|
||||||
const ps1Filename = path.join(bindir, 'rebar3.ps1')
|
const ps1Filename = path.join(bindir, 'rebar3.ps1')
|
||||||
fs.writeFileSync(ps1Filename, `& escript.exe ${oldPath} \${args}`)
|
fs.writeFileSync(ps1Filename, `& escript.exe ${newPath} \${args}`)
|
||||||
|
|
||||||
const cmdFilename = path.join(bindir, 'rebar3.cmd')
|
const cmdFilename = path.join(bindir, 'rebar3.cmd')
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
cmdFilename,
|
cmdFilename,
|
||||||
`@echo off\r\nescript.exe ${oldPath} %*`,
|
`@echo off\r\nescript.exe ${newPath} %*`,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
reportVersion: () => {
|
reportVersion: () => {
|
||||||
const cmd = 'rebar3.cmd'
|
const cmd = 'rebar3.cmd'
|
||||||
const args = ['version']
|
const args = ['version']
|
||||||
|
const env = {}
|
||||||
|
|
||||||
return [cmd, args]
|
return [cmd, args, env]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -952,19 +963,29 @@ async function installTool(opts) {
|
|||||||
core.debug(` ... it is, at ${cachePath}`)
|
core.debug(` ... it is, at ${cachePath}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
core.debug('Performing post extract operations...')
|
// This makes sure we run, e.g. in Windows, the installer in the runner
|
||||||
await platformOpts.postExtract(cachePath)
|
// We're not caching the install, just the downloaded tool
|
||||||
|
const runnerToolPath = path.join(
|
||||||
|
process.env.RUNNER_TEMP,
|
||||||
|
'.setup-beam',
|
||||||
|
toolName,
|
||||||
|
)
|
||||||
|
fs.cpSync(cachePath, runnerToolPath, { recursive: true })
|
||||||
|
|
||||||
core.debug(`Adding ${cachePath}'s bin to system path`)
|
core.debug('Performing post extract operations...')
|
||||||
core.addPath(path.join(cachePath, 'bin'))
|
await platformOpts.postExtract(runnerToolPath)
|
||||||
|
|
||||||
|
core.debug(`Adding ${runnerToolPath}' bin to system path`)
|
||||||
|
const runnerToolPathBin = path.join(runnerToolPath, 'bin')
|
||||||
|
core.addPath(runnerToolPathBin)
|
||||||
|
|
||||||
const installDirForVarName = `INSTALL_DIR_FOR_${toolName}`.toUpperCase()
|
const installDirForVarName = `INSTALL_DIR_FOR_${toolName}`.toUpperCase()
|
||||||
core.debug(`Exporting ${installDirForVarName} as ${cachePath}`)
|
core.debug(`Exporting ${installDirForVarName} as ${runnerToolPath}`)
|
||||||
core.exportVariable(installDirForVarName, cachePath)
|
core.exportVariable(installDirForVarName, runnerToolPath)
|
||||||
|
|
||||||
core.info(`Installed ${installOpts.tool} version`)
|
core.info(`Installed ${installOpts.tool} version`)
|
||||||
const [cmd, args] = platformOpts.reportVersion()
|
const [cmd, args, env] = platformOpts.reportVersion()
|
||||||
await exec(cmd, args)
|
await exec(cmd, args, { env: { ...process.env, ...env } })
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkPlatform() {
|
function checkPlatform() {
|
||||||
|
|||||||
+2
-2
@@ -11,8 +11,8 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.0.0
|
- uses: actions/checkout@v4
|
||||||
- uses: erlef/setup-beam@v1.9.0
|
- uses: erlef/setup-beam@v1
|
||||||
with:
|
with:
|
||||||
otp-version: "23.2"
|
otp-version: "23.2"
|
||||||
gleam-version: "0.23.0-rc1"
|
gleam-version: "0.23.0-rc1"
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ simulateInput('hexpm-mirrors', 'https://builds.hex.pm', { multiline: true })
|
|||||||
|
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
const os = require('os')
|
||||||
|
const path = require('path')
|
||||||
const core = require('@actions/core')
|
const core = require('@actions/core')
|
||||||
const setupBeam = require('../src/setup-beam')
|
const setupBeam = require('../src/setup-beam')
|
||||||
const { problemMatcher } = require('../matchers/elixir-matchers.json')
|
const { problemMatcher } = require('../matchers/elixir-matchers.json')
|
||||||
@@ -128,6 +130,20 @@ async function testOTPVersions() {
|
|||||||
|
|
||||||
if (process.platform === 'linux') {
|
if (process.platform === 'linux') {
|
||||||
before = simulateInput('version-type', 'strict')
|
before = simulateInput('version-type', 'strict')
|
||||||
|
spec = '26'
|
||||||
|
osVersion = 'ubuntu-24.04'
|
||||||
|
expected = 'maint-26'
|
||||||
|
got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors)
|
||||||
|
assert.deepStrictEqual(got, expected)
|
||||||
|
|
||||||
|
simulateInput('version-type', before)
|
||||||
|
spec = '27.0'
|
||||||
|
osVersion = 'ubuntu-24.04'
|
||||||
|
expected = 'OTP-27.0'
|
||||||
|
got = await setupBeam.getOTPVersion(spec, osVersion, hexMirrors)
|
||||||
|
assert.deepStrictEqual(got, expected)
|
||||||
|
|
||||||
|
simulateInput('version-type', before)
|
||||||
spec = '25.3.2.1'
|
spec = '25.3.2.1'
|
||||||
osVersion = 'ubuntu-20.04'
|
osVersion = 'ubuntu-20.04'
|
||||||
expected = 'OTP-25.3.2.1'
|
expected = 'OTP-25.3.2.1'
|
||||||
@@ -535,6 +551,14 @@ rebar ${rebar3}`
|
|||||||
assert.strictEqual(appVersions.get('erlang'), erlang)
|
assert.strictEqual(appVersions.get('erlang'), erlang)
|
||||||
assert.strictEqual(appVersions.get('elixir'), elixir)
|
assert.strictEqual(appVersions.get('elixir'), elixir)
|
||||||
|
|
||||||
|
const absoluteFilename = path.join(os.tmpdir(), '.tool-versions')
|
||||||
|
fs.writeFileSync(absoluteFilename, toolVersions)
|
||||||
|
|
||||||
|
process.env.GITHUB_WORKSPACE = process.cwd()
|
||||||
|
const absoluteAppVersions = setupBeam.parseVersionFile(absoluteFilename)
|
||||||
|
assert.strictEqual(absoluteAppVersions.get('erlang'), erlang)
|
||||||
|
assert.strictEqual(absoluteAppVersions.get('elixir'), elixir)
|
||||||
|
|
||||||
assert.ok(async () => {
|
assert.ok(async () => {
|
||||||
await setupBeam.install('otp', { toolVersion: erlang })
|
await setupBeam.install('otp', { toolVersion: erlang })
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user