-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement (very basic) first version #5
Conversation
1. renames input-1 as elp-version and drops outputs 2. tests with the help of erlef/setup-beam: both test and action 3. implements basic understanding of arch.s and platforms 4. installs ELP and caches it as a tool 5. outputs the result of `elp version` when installed 6. fetches Erlang version from running system (using -eval)
|
||
- name: Output input-1 (from output-1) | ||
run: echo "${{ steps.setup-elp.outputs.output-1 }}" | ||
- run: elp version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this works, it means installation for ELP for the arch + platform + OTP (derived from the erl
execution) went Ok
README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't need to be complete, at the moment; it's just a better draft than what we had.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not close to complete, but a very basic working version (locally everything passes until I reach elp version
- I believe it's because I'm downloading for ARM, but the executable is AMD)
src/setup-elp.js
Outdated
|
||
const runnerToolPath = path.join(process.env.RUNNER_TEMP, '.setup-elp', 'elp') | ||
fs.cpSync(cachePath, runnerToolPath, { recursive: true }) | ||
fs.chmodSync(path.join(runnerToolPath, 'elp'), 0o755) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this is required. Doing a regular download (wget
+ tar zx
) fetches the proper attributes.
We also do some pretty'ing for readability (hopefully!)
We were caching a file, not a folder, and then that file (unextracted) is the one that was being copied for use
b1d5190
to
f60191b
Compare
... so we turn YYYY-MM-DD_N into YYYY.MM.DD+N
7b2b416
to
8a11f0a
Compare
function semverFromELPVersion(elpVersion) { | ||
let [major, minor, patch, build] = elpVersion.split(/[-_]/).slice(0, 4) | ||
return `${Number(major)}.${Number(minor)}.${Number(patch)}+${Number(build) || 1}` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An important element...
Description
This pull request is a step in the next direction 😄
input-1
aselp-version
and drops outputserlef/setup-beam
: both npm test and the action itselfelp version
when installed