mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-23 07:06:07 +00:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8aa8a857c6 | |||
| 3e793a73ab | |||
| 98ad08a06d | |||
| f28fd8ebb9 | |||
| cc72a5b176 | |||
| 8e3c26cc73 | |||
| 4b97eeaf23 | |||
| 3eb03c83a9 | |||
| 0006652c69 | |||
| fb48206988 | |||
| adebba768f | |||
| 3360bfffe1 | |||
| e5b66193a0 | |||
| ff934e2456 | |||
| 2ad1b45db1 | |||
| 45dc207efd | |||
| 81b8173cf0 | |||
| b27f958e47 | |||
| ff4f054c91 | |||
| 5fa4c5f4ff | |||
| 58e153bc87 | |||
| e511d62e46 |
@@ -49,9 +49,9 @@ jobs:
|
||||
version-type: 'strict'
|
||||
- otp-version: '25'
|
||||
os: 'ubuntu-24.04'
|
||||
- otp-version: '25'
|
||||
- otp-version: '26'
|
||||
elixir-version: '1.16'
|
||||
rebar3-version: '3'
|
||||
rebar3-version: '3.25'
|
||||
os: 'ubuntu-22.04'
|
||||
- otp-version: '25.0'
|
||||
elixir-version: 'v1.13.4-otp-25'
|
||||
@@ -63,64 +63,17 @@ jobs:
|
||||
rebar3-version: '3.18.0'
|
||||
os: 'ubuntu-latest'
|
||||
version-type: 'strict'
|
||||
- otp-version: '25'
|
||||
rebar3-version: 'nightly'
|
||||
- otp-version: 'latest'
|
||||
rebar3-version: 'latest'
|
||||
os: 'ubuntu-latest'
|
||||
- otp-version: '26'
|
||||
rebar3-version: 'nightly'
|
||||
os: 'ubuntu-latest'
|
||||
- elixir-version: 'v1.6'
|
||||
otp-version: '21'
|
||||
rebar3-version: '3.12'
|
||||
os: 'ubuntu-20.04'
|
||||
- elixir-version: 'v1.7'
|
||||
otp-version: '22'
|
||||
rebar3-version: '3.13'
|
||||
os: 'ubuntu-20.04'
|
||||
- elixir-version: 'v1.10'
|
||||
otp-version: '23'
|
||||
rebar3-version: '3.14'
|
||||
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.12'
|
||||
otp-version: '24'
|
||||
rebar3-version: '3.15'
|
||||
os: 'ubuntu-20.04'
|
||||
- elixir-version: 'v1.11.0'
|
||||
otp-version: '22.3.4.2'
|
||||
os: 'ubuntu-20.04'
|
||||
version-type: 'strict'
|
||||
- elixir-version: '1.10.3'
|
||||
otp-version: '22.3.4.1'
|
||||
os: 'ubuntu-20.04'
|
||||
version-type: 'strict'
|
||||
- elixir-version: 'main'
|
||||
otp-version: '23.1'
|
||||
os: 'ubuntu-20.04'
|
||||
version-type: 'strict'
|
||||
- elixir-version: 'main'
|
||||
otp-version: '25'
|
||||
os: 'ubuntu-20.04'
|
||||
version-type: 'strict'
|
||||
- gleam-version: '0.23'
|
||||
otp-version: '24'
|
||||
- gleam-version: '1.9.0'
|
||||
otp-version: '27'
|
||||
os: 'ubuntu-latest'
|
||||
disable_problem_matchers: true
|
||||
- gleam-version: '0.23.0-rc1'
|
||||
otp-version: '24'
|
||||
os: 'ubuntu-latest'
|
||||
disable_problem_matchers: true
|
||||
- gleam-version: '0.23.0-rc1'
|
||||
- gleam-version: '1.9.0'
|
||||
otp-version: false
|
||||
os: 'ubuntu-latest'
|
||||
disable_problem_matchers: true
|
||||
- gleam-version: '0.22.0' # Version with Gleam's old archive naming convention
|
||||
otp-version: '24'
|
||||
os: 'ubuntu-latest'
|
||||
disable_problem_matchers: true
|
||||
- elixir-version: 'v1.13'
|
||||
otp-version: '24'
|
||||
escript_packages: 'hex protobuf'
|
||||
@@ -168,12 +121,12 @@ jobs:
|
||||
if: ${{matrix.combo.rebar3-version}}
|
||||
- name: Format Gleam project (without installing Erlang/OTP)
|
||||
run: |
|
||||
cd test/projects/gleam_gleam
|
||||
cd test/projects/gleamgleam
|
||||
gleam format
|
||||
if: ${{ matrix.combo.gleam-version && !matrix.combo.otp-version }}
|
||||
- name: Run Gleam project tests (without `rebar3`)
|
||||
run: |
|
||||
cd test/projects/gleam_gleam
|
||||
cd test/projects/gleamgleam
|
||||
gleam test
|
||||
if: ${{ matrix.combo.gleam-version && matrix.combo.otp-version && !matrix.combo.rebar3-version }}
|
||||
- name: Run escript
|
||||
@@ -189,11 +142,11 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
combo:
|
||||
- otp-version: '25'
|
||||
elixir-version: 'v1.14'
|
||||
gleam-version: '1.0.0'
|
||||
rebar3-version: 'nightly'
|
||||
os: 'ubuntu-latest'
|
||||
- otp-version: latest
|
||||
elixir-version: latest
|
||||
gleam-version: latest
|
||||
rebar3-version: nightly
|
||||
os: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use erlef/setup-beam
|
||||
|
||||
@@ -38,15 +38,9 @@ jobs:
|
||||
elixir-version: '1.14.5'
|
||||
os: 'windows-latest'
|
||||
version-type: 'strict'
|
||||
- otp-version: '25'
|
||||
rebar3-version: 'nightly'
|
||||
os: 'windows-latest'
|
||||
- otp-version: '24.0.2'
|
||||
rebar3-version: '3.16'
|
||||
os: 'windows-2019'
|
||||
- otp-version: '26.1'
|
||||
rebar3-version: 'nightly'
|
||||
os: 'windows-2019'
|
||||
- otp-version: '23.0'
|
||||
rebar3-version: '3.15'
|
||||
os: 'windows-2019'
|
||||
@@ -58,11 +52,8 @@ jobs:
|
||||
otp-version: '24'
|
||||
rebar3-version: '3.15'
|
||||
os: 'windows-latest'
|
||||
- gleam-version: '0.19.0-rc3'
|
||||
otp-version: '24'
|
||||
os: 'windows-latest'
|
||||
- gleam-version: '0.23.0-rc1'
|
||||
otp-version: '24'
|
||||
- gleam-version: '1.9.0'
|
||||
otp-version: '27'
|
||||
os: 'windows-latest'
|
||||
- elixir-version: 'v1.13'
|
||||
otp-version: '24'
|
||||
@@ -131,11 +122,11 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
combo:
|
||||
- otp-version: '25'
|
||||
elixir-version: 'v1.14'
|
||||
gleam-version: '1.0.0'
|
||||
rebar3-version: 'nightly'
|
||||
os: 'windows-latest'
|
||||
- otp-version: latest
|
||||
elixir-version: latest
|
||||
gleam-version: latest
|
||||
rebar3-version: nightly
|
||||
os: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use erlef/setup-beam
|
||||
|
||||
+2
-104
@@ -2239,30 +2239,6 @@ the licensed code:
|
||||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: function-bind. A copy of the source code may be downloaded from https://github.com/Raynos/function-bind.git. This software contains the following license and notice below:
|
||||
|
||||
Copyright (c) 2013 Raynos.
|
||||
|
||||
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: get-caller-file. A copy of the source code may be downloaded from git+https://github.com/stefanpenner/get-caller-file.git. This software contains the following license and notice below:
|
||||
|
||||
ISC License (ISC)
|
||||
@@ -2274,32 +2250,6 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE
|
||||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: get-intrinsic. A copy of the source code may be downloaded from git+https://github.com/ljharb/get-intrinsic.git. This software contains the following license and notice below:
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 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: glob. A copy of the source code may be downloaded from git://github.com/isaacs/node-glob.git. This software contains the following license and notice below:
|
||||
|
||||
The ISC License
|
||||
@@ -2510,7 +2460,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: has-property-descriptors, has-proto. A copy of the source code may be downloaded from git+https://github.com/inspect-js/has-property-descriptors.git (has-property-descriptors), git+https://github.com/inspect-js/has-proto.git (has-proto). This software contains the following license and notice below:
|
||||
The following software may be included in this product: has-property-descriptors. A copy of the source code may be downloaded from git+https://github.com/inspect-js/has-property-descriptors.git. This software contains the following license and notice below:
|
||||
|
||||
MIT License
|
||||
|
||||
@@ -2536,58 +2486,6 @@ SOFTWARE.
|
||||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: has-symbols. A copy of the source code may be downloaded from git://github.com/inspect-js/has-symbols.git. This software contains the following license and notice below:
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 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: hasown. A copy of the source code may be downloaded from git+https://github.com/inspect-js/hasOwn.git. This software contains the following license and notice below:
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) Jordan Harband and contributors
|
||||
|
||||
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: ieee754. A copy of the source code may be downloaded from git://github.com/feross/ieee754.git. This software contains the following license and notice below:
|
||||
|
||||
Copyright 2008 Fair Oaks Labs, Inc.
|
||||
@@ -9464,7 +9362,7 @@ The following software may be included in this product: reusify. A copy of the s
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Matteo Collina
|
||||
Copyright (c) 2015-2024 Matteo Collina
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at
|
||||
[support@github.com](mailto:support@github.com). All complaints will be
|
||||
reviewed and investigated and will result in a response that is deemed
|
||||
necessary and appropriate to the circumstances. The project team is obligated
|
||||
to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
<https://www.contributor-covenant.org/faq>
|
||||
@@ -71,14 +71,14 @@ be the latest.
|
||||
This list presents the known working version combos between the target operating system
|
||||
and Erlang/OTP.
|
||||
|
||||
| Operating system | Erlang/OTP | Status
|
||||
|- |- |-
|
||||
| `ubuntu-18.04` | 17.0 - 25.3 | ✅
|
||||
| `ubuntu-20.04` | 21.0 - 27 | ✅
|
||||
| `ubuntu-22.04` | 24.2 - 27 | ✅
|
||||
| `ubuntu-24.04` | 24.3 - 27 | ✅
|
||||
| `windows-2019` | 21* - 25 | ✅
|
||||
| `windows-2022` | 21* - 27 | ✅
|
||||
| Operating system | Erlang/OTP | OTP Architecture | Status
|
||||
|- |- | - |-
|
||||
| `ubuntu-18.04` | 17.0 - 25.3 | x86_64, arm64 | ✅
|
||||
| `ubuntu-20.04` | 21.0 - 27 | x86_64, arm64 | ✅
|
||||
| `ubuntu-22.04` | 24.2 - 27 | x86_64, arm64 | ✅
|
||||
| `ubuntu-24.04` | 24.3 - 27 | x86_64, arm64 | ✅
|
||||
| `windows-2019` | 21\* - 25 | x86_64, x86 | ✅
|
||||
| `windows-2022` | 21\* - 27 | x86_64, x86 | ✅
|
||||
|
||||
**Note** \*: prior to 23, Windows builds are only available for minor versions, e.g. 21.0, 21.3,
|
||||
22.0, etc.
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
test:
|
||||
runs-on: self-hosted
|
||||
env:
|
||||
ImageOS: ubuntu20 # equivalent to runs-on ubuntu-20.04
|
||||
ImageOS: ubuntu24 # equivalent to runs-on ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: erlef/setup-beam@v1
|
||||
@@ -121,7 +121,7 @@ The action provides the following outputs:
|
||||
|- |-
|
||||
| `otp-version` | The Erlang version, e.g. `OTP-26.0`
|
||||
| `elixir-version` | The Elixir version, e.g. `v1.14-otp-26`
|
||||
| `gleam-version` | The Gleam version, e.g. `v0.23.0`
|
||||
| `gleam-version` | The Gleam version, e.g. `v1.5.1`
|
||||
| `rebar3-version` | The `rebar3` version, e.g. `3.18.0`
|
||||
| `setup-beam-version` | The commit unique id of the executed action version, e.g. `a34c98f`
|
||||
|
||||
@@ -194,6 +194,24 @@ jobs:
|
||||
https://cdn.jsdelivr.net/hex
|
||||
```
|
||||
|
||||
### OTP Architecture
|
||||
|
||||
On Windows you can specify the OTP architecture to install.
|
||||
|
||||
```yaml
|
||||
# create this in .github/workflows/ci.yml
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: '26'
|
||||
otp-architecture: '32'
|
||||
```
|
||||
|
||||
### Environment variables
|
||||
|
||||
Base installation folders (useful for e.g. fetching headers for NIFs) are available in the following
|
||||
@@ -223,12 +241,12 @@ on: push
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
|
||||
strategy:
|
||||
matrix:
|
||||
otp: ['21.1', '22.2', '23.3']
|
||||
elixir: ['1.8.2', '1.9.4']
|
||||
otp: ['25.3.2', '26.2.5', '27.3.3']
|
||||
elixir: ['1.17.3', '1.18.3']
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: erlef/setup-beam@v1
|
||||
@@ -247,12 +265,12 @@ on: push
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
name: Erlang/OTP ${{matrix.otp}} / rebar3 ${{matrix.rebar3}}
|
||||
strategy:
|
||||
matrix:
|
||||
otp: ['21.1', '22.2', '23.3']
|
||||
rebar3: ['3.14.1', '3.14.3']
|
||||
otp: ['25.3.2', '26.2.5', '27.3.3']
|
||||
rebar3: ['3.23.0', '3.24.0']
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: erlef/setup-beam@v1
|
||||
@@ -293,8 +311,8 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: '24'
|
||||
gleam-version: '0.23.0-rc1'
|
||||
otp-version: '27'
|
||||
gleam-version: '1.9.0'
|
||||
- run: gleam test
|
||||
```
|
||||
|
||||
@@ -312,7 +330,7 @@ jobs:
|
||||
- uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: false
|
||||
gleam-version: '0.23.0-rc1'
|
||||
gleam-version: '1.9.0'
|
||||
- run: gleam check
|
||||
```
|
||||
|
||||
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
# Security policy
|
||||
|
||||
Thanks for helping make `setup-beam` safer for everyone.
|
||||
|
||||
Find below updated information on our security policy.
|
||||
|
||||
## Security
|
||||
|
||||
We take the security of this software seriously.
|
||||
|
||||
We don't implement a bug bounty program or bounty rewards, but will work with
|
||||
you to ensure that your findings get the appropriate handling.
|
||||
|
||||
## Reporting Security Issues
|
||||
|
||||
If you believe you have found a security vulnerability in this repository,
|
||||
please report it to <bryan.paxton@erlef.org>.
|
||||
|
||||
Please do not report security vulnerabilities through public channels, like
|
||||
GitHub issues, discussions, or pull requests.
|
||||
|
||||
Please include as much of the information listed below as you can to help us
|
||||
better understand and resolve the issue:
|
||||
|
||||
- the type of issue (e.g., buffer overflow, SQL injection, or cross-site
|
||||
scripting)
|
||||
- full paths of source file(s) related to the manifestation of the issue
|
||||
- the location of the affected source code (tag/branch/commit or direct URL)
|
||||
- any special configuration required to reproduce the issue
|
||||
- step-by-step instructions to reproduce the issue
|
||||
- proof-of-concept or exploit code (if possible)
|
||||
- impact of the issue, including how an attacker might exploit the issue
|
||||
|
||||
This information will help us triage your report more quickly.
|
||||
@@ -19,6 +19,9 @@ inputs:
|
||||
otp-version:
|
||||
description: Version range or exact version of Erlang/OTP to use,
|
||||
or false when installing only Gleam without OTP
|
||||
otp-architecture:
|
||||
description: 32 or 64, to specify the architecture of the OTP to install. Only applies to Windows.
|
||||
default: 64
|
||||
elixir-version:
|
||||
description: Version range or exact version of Elixir to use
|
||||
gleam-version:
|
||||
|
||||
Vendored
+32
-5
@@ -9119,6 +9119,7 @@ main().catch((err) => {
|
||||
|
||||
async function main() {
|
||||
checkPlatform()
|
||||
checkOtpArchitecture()
|
||||
|
||||
const versionFilePath = getInput('version-file', false)
|
||||
let versions
|
||||
@@ -9155,7 +9156,7 @@ async function main() {
|
||||
await maybeInstallRebar3(rebar3Spec)
|
||||
|
||||
// undefined is replaced by a function, post- main branch merge
|
||||
const setupBeamVersion = '1f578f0'
|
||||
const setupBeamVersion = '3e793a7'
|
||||
core.setOutput('setup-beam-version', setupBeamVersion)
|
||||
}
|
||||
|
||||
@@ -9283,7 +9284,13 @@ async function getOTPVersion(otpSpec0, osVersion) {
|
||||
|
||||
async function getElixirVersion(exSpec0, otpVersion0) {
|
||||
const otpVersion = otpVersion0.match(/^([^-]+-)?(.+)$/)[2]
|
||||
const otpVersionMajor = otpVersion.match(/^([^.]+).*$/)[1]
|
||||
let otpVersionMajor = otpVersion.match(/^([^.]+).*$/)[1]
|
||||
|
||||
const userSuppliedOtp = exSpec0.match(/-otp-(\d+)/)?.[1] ?? null
|
||||
|
||||
if (userSuppliedOtp && isVersion(userSuppliedOtp)) {
|
||||
otpVersionMajor = userSuppliedOtp
|
||||
}
|
||||
|
||||
const [otpVersionsForElixirMap, elixirVersions] = await getElixirVersions()
|
||||
const spec = exSpec0.replace(/-otp-.*$/, '')
|
||||
@@ -9388,13 +9395,16 @@ async function getOTPVersions(osVersion) {
|
||||
otpVersions[otpVersion] = otpVersionOrig // we keep the original for later reference
|
||||
})
|
||||
} else if (process.platform === 'win32') {
|
||||
const file_regex = new RegExp(
|
||||
`^otp_win${getInput('otp-architecture')}_(.*).exe$`,
|
||||
)
|
||||
otpVersionsListings.forEach((otpVersionsListing) => {
|
||||
otpVersionsListing
|
||||
.map((x) => x.assets)
|
||||
.flat()
|
||||
.filter((x) => x.name.match(/^otp_win64_.*.exe$/))
|
||||
.filter((x) => x.name.match(file_regex))
|
||||
.forEach((x) => {
|
||||
const otpMatch = x.name.match(/^otp_win64_(.*).exe$/)
|
||||
const otpMatch = x.name.match(file_regex)
|
||||
const otpVersion = otpMatch[1]
|
||||
debugLog('OTP line and parsing', [otpMatch, otpVersion])
|
||||
otpVersions[otpVersion] = otpVersion
|
||||
@@ -9899,7 +9909,9 @@ async function install(toolName, opts) {
|
||||
win32: {
|
||||
downloadToolURL: () =>
|
||||
'https://github.com/erlang/otp/releases/download/' +
|
||||
`OTP-${toolVersion}/otp_win64_${toolVersion}.exe`,
|
||||
`OTP-${toolVersion}/otp_win${getInput(
|
||||
'otp-architecture',
|
||||
)}_${toolVersion}.exe`,
|
||||
extract: async () => ['file', 'otp.exe'],
|
||||
postExtract: async (cachePath) => {
|
||||
const cmd = path.join(cachePath, 'otp.exe')
|
||||
@@ -10155,6 +10167,21 @@ function checkPlatform() {
|
||||
}
|
||||
}
|
||||
|
||||
function checkOtpArchitecture() {
|
||||
if (process.platform !== 'win32' && getInput('otp-architecture') == '32') {
|
||||
throw new Error(
|
||||
'@erlef/setup-beam only supports otp-architecture=32 on Windows',
|
||||
)
|
||||
}
|
||||
|
||||
if (
|
||||
getInput('otp-architecture') !== '32' &&
|
||||
getInput('otp-architecture') !== '64'
|
||||
) {
|
||||
throw new Error('otp-architecture must be 32 or 64')
|
||||
}
|
||||
}
|
||||
|
||||
function debugLoggingEnabled() {
|
||||
return !!process.env.RUNNER_DEBUG
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
"licenses": "yarn licenses generate-disclaimer > 3RD_PARTY_LICENSES",
|
||||
"markdownlint": "markdownlint *.md ./github/**/*.md",
|
||||
"shellcheck": "shellcheck .github/workflows/*.sh",
|
||||
"test": "node test/setup-beam.test.js",
|
||||
"test": "node --test --test-reporter=spec",
|
||||
"yamllint": "yamllint .github/workflows/**.yml && yamllint .*.yml && yamllint *.yml",
|
||||
"clean-dist": "rm -rf ./dist",
|
||||
"lint": "npm run markdownlint && npm run shellcheck && npm run yamllint && npm run jslint",
|
||||
|
||||
+32
-5
@@ -14,6 +14,7 @@ main().catch((err) => {
|
||||
|
||||
async function main() {
|
||||
checkPlatform()
|
||||
checkOtpArchitecture()
|
||||
|
||||
const versionFilePath = getInput('version-file', false)
|
||||
let versions
|
||||
@@ -50,7 +51,7 @@ async function main() {
|
||||
await maybeInstallRebar3(rebar3Spec)
|
||||
|
||||
// undefined is replaced by a function, post- main branch merge
|
||||
const setupBeamVersion = '1f578f0'
|
||||
const setupBeamVersion = '3e793a7'
|
||||
core.setOutput('setup-beam-version', setupBeamVersion)
|
||||
}
|
||||
|
||||
@@ -183,7 +184,13 @@ async function getOTPVersion(otpSpec0, osVersion) {
|
||||
|
||||
async function getElixirVersion(exSpec0, otpVersion0) {
|
||||
const otpVersion = otpVersion0.match(/^([^-]+-)?(.+)$/)[2]
|
||||
const otpVersionMajor = otpVersion.match(/^([^.]+).*$/)[1]
|
||||
let otpVersionMajor = otpVersion.match(/^([^.]+).*$/)[1]
|
||||
|
||||
const userSuppliedOtp = exSpec0.match(/-otp-(\d+)/)?.[1] ?? null
|
||||
|
||||
if (userSuppliedOtp && isVersion(userSuppliedOtp)) {
|
||||
otpVersionMajor = userSuppliedOtp
|
||||
}
|
||||
|
||||
const [otpVersionsForElixirMap, elixirVersions] = await getElixirVersions()
|
||||
const spec = exSpec0.replace(/-otp-.*$/, '')
|
||||
@@ -288,13 +295,16 @@ async function getOTPVersions(osVersion) {
|
||||
otpVersions[otpVersion] = otpVersionOrig // we keep the original for later reference
|
||||
})
|
||||
} else if (process.platform === 'win32') {
|
||||
const file_regex = new RegExp(
|
||||
`^otp_win${getInput('otp-architecture')}_(.*).exe$`,
|
||||
)
|
||||
otpVersionsListings.forEach((otpVersionsListing) => {
|
||||
otpVersionsListing
|
||||
.map((x) => x.assets)
|
||||
.flat()
|
||||
.filter((x) => x.name.match(/^otp_win64_.*.exe$/))
|
||||
.filter((x) => x.name.match(file_regex))
|
||||
.forEach((x) => {
|
||||
const otpMatch = x.name.match(/^otp_win64_(.*).exe$/)
|
||||
const otpMatch = x.name.match(file_regex)
|
||||
const otpVersion = otpMatch[1]
|
||||
debugLog('OTP line and parsing', [otpMatch, otpVersion])
|
||||
otpVersions[otpVersion] = otpVersion
|
||||
@@ -799,7 +809,9 @@ async function install(toolName, opts) {
|
||||
win32: {
|
||||
downloadToolURL: () =>
|
||||
'https://github.com/erlang/otp/releases/download/' +
|
||||
`OTP-${toolVersion}/otp_win64_${toolVersion}.exe`,
|
||||
`OTP-${toolVersion}/otp_win${getInput(
|
||||
'otp-architecture',
|
||||
)}_${toolVersion}.exe`,
|
||||
extract: async () => ['file', 'otp.exe'],
|
||||
postExtract: async (cachePath) => {
|
||||
const cmd = path.join(cachePath, 'otp.exe')
|
||||
@@ -1055,6 +1067,21 @@ function checkPlatform() {
|
||||
}
|
||||
}
|
||||
|
||||
function checkOtpArchitecture() {
|
||||
if (process.platform !== 'win32' && getInput('otp-architecture') == '32') {
|
||||
throw new Error(
|
||||
'@erlef/setup-beam only supports otp-architecture=32 on Windows',
|
||||
)
|
||||
}
|
||||
|
||||
if (
|
||||
getInput('otp-architecture') !== '32' &&
|
||||
getInput('otp-architecture') !== '64'
|
||||
) {
|
||||
throw new Error('otp-architecture must be 32 or 64')
|
||||
}
|
||||
}
|
||||
|
||||
function debugLoggingEnabled() {
|
||||
return !!process.env.RUNNER_DEBUG
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
# gleam_gleam
|
||||
|
||||
A Gleam project
|
||||
|
||||
## Quick start
|
||||
|
||||
```sh
|
||||
gleam run # Run the project
|
||||
gleam test # Run the tests
|
||||
gleam shell # Run an Erlang shell
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
If available on Hex this package can be added to your Gleam project.
|
||||
|
||||
```sh
|
||||
gleam add gleam_gleam
|
||||
```
|
||||
@@ -1,16 +0,0 @@
|
||||
name = "gleam_gleam"
|
||||
version = "0.1.0"
|
||||
|
||||
# Fill out these fields if you intend to generate HTML documentation or publish
|
||||
# your project to the Hex package manager.
|
||||
#
|
||||
# licences = ["Apache-2.0"]
|
||||
# description = "A Gleam library..."
|
||||
# repository = { type = "github", user = "username", repo = "project" }
|
||||
# links = [{ title = "Website", href = "https://gleam.run" }]
|
||||
|
||||
[dependencies]
|
||||
gleam_stdlib = "~> 0.18"
|
||||
|
||||
[dev-dependencies]
|
||||
gleeunit = "~> 0.5"
|
||||
@@ -1,11 +0,0 @@
|
||||
# This file was generated by Gleam
|
||||
# You typically do not need to edit this file
|
||||
|
||||
packages = [
|
||||
{ name = "gleam_stdlib", version = "0.22.3", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "F2C2D389B06426E1289D5419F89BDE8E0F7F35A40B2BBB3C88188481F0D44A9F" },
|
||||
{ name = "gleeunit", version = "0.6.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "A006864621DB80C4FBB0746580703502FD81A4D38D23FCB20A8120984D353DF0" },
|
||||
]
|
||||
|
||||
[requirements]
|
||||
gleam_stdlib = "~> 0.18"
|
||||
gleeunit = "~> 0.5"
|
||||
@@ -1,5 +0,0 @@
|
||||
import gleam/io
|
||||
|
||||
pub fn main() {
|
||||
io.println("Hello from gleam_gleam!")
|
||||
}
|
||||
+5
-3
@@ -14,8 +14,10 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: "23.2"
|
||||
gleam-version: "0.23.0-rc1"
|
||||
- run: gleam format --check src test
|
||||
otp-version: "26.0.2"
|
||||
gleam-version: "1.5.0"
|
||||
rebar3-version: "3"
|
||||
# elixir-version: "1.15.4"
|
||||
- run: gleam deps download
|
||||
- run: gleam test
|
||||
- run: gleam format --check src test
|
||||
@@ -1,4 +1,4 @@
|
||||
*.beam
|
||||
*.ez
|
||||
build
|
||||
/build
|
||||
erl_crash.dump
|
||||
@@ -0,0 +1,24 @@
|
||||
# gleamgleam
|
||||
|
||||
[](https://hex.pm/packages/gleamgleam)
|
||||
[](https://hexdocs.pm/gleamgleam/)
|
||||
|
||||
```sh
|
||||
gleam add gleamgleam@1
|
||||
```
|
||||
```gleam
|
||||
import gleamgleam
|
||||
|
||||
pub fn main() {
|
||||
// TODO: An example of the project in use
|
||||
}
|
||||
```
|
||||
|
||||
Further documentation can be found at <https://hexdocs.pm/gleamgleam>.
|
||||
|
||||
## Development
|
||||
|
||||
```sh
|
||||
gleam run # Run the project
|
||||
gleam test # Run the tests
|
||||
```
|
||||
@@ -0,0 +1,19 @@
|
||||
name = "gleamgleam"
|
||||
version = "1.0.0"
|
||||
|
||||
# Fill out these fields if you intend to generate HTML documentation or publish
|
||||
# your project to the Hex package manager.
|
||||
#
|
||||
# description = ""
|
||||
# licences = ["Apache-2.0"]
|
||||
# repository = { type = "github", user = "", repo = "" }
|
||||
# links = [{ title = "Website", href = "" }]
|
||||
#
|
||||
# For a full reference of all the available options, you can have a look at
|
||||
# https://gleam.run/writing-gleam/gleam-toml/.
|
||||
|
||||
[dependencies]
|
||||
gleam_stdlib = ">= 0.34.0 and < 2.0.0"
|
||||
|
||||
[dev-dependencies]
|
||||
gleeunit = ">= 1.0.0 and < 2.0.0"
|
||||
@@ -0,0 +1,5 @@
|
||||
import gleam/io
|
||||
|
||||
pub fn main() {
|
||||
io.println("Hello from gleamgleam!")
|
||||
}
|
||||
+791
-792
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user