Skip to content
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

Fix Linux builds && Node version && add Windows support #4

Merged
merged 6 commits into from
Aug 21, 2024

Conversation

pandasauce
Copy link

Linux Builds

The CI build depends on the Microsoft Azure VM image for Ubuntu, which is far from a standard environment. ARM builds also require sudo and seem to assume that the build is being run as root in the first place.

This Dockerfile provides a fixed environment for building on Linux.

Node 20

Building with Node 16 was failing with permission errors in oclif. Upgrading to Node 20 fixed this.

+ yarn package-deb
yarn run v1.22.22
$ oclif pack deb
 ›   Warning: oclif update available from 3.7.3 to 4.14.12.
oclif: gathering workspace for ns-cli to /build/cli/tmp/ns-cli
    Error: Command failed: npm pack --unsafe-perm
    /tmp/yarn--1722444948707-0.497377533169139/node: 3: exec: /root/.nvm/versions/node/v16.20.2/bin/node: Permission denied
    npm ERR! code 126
    npm ERR! path /build/cli
    npm ERR! command failed
    npm ERR! command sh -c -- yarn build && oclif manifest && oclif readme

    npm ERR! A complete log of this run can be found in:
    npm ERR!     /root/.npm/_logs/2024-07-31T16_55_49_476Z-debug-0.log

    Code: 126
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Windows Support

@1tacocat1's solution ran on Windows after fixing the builds, but existing path treatment was coded in a non-portable way, so it was failing to load the configuration. This is now fixed.

GitHub actions workflow was updated to include the dependencies for the Windows builds and to produce Windows artifacts.

Georgi Boiko added 5 commits August 1, 2024 11:22
The CI build depends on the Microsoft Azure VM image for Ubuntu, which
is far from a standard environment. ARM builds also require sudo and
seem to assume that the build is being run as root in the first place.

This Dockerfile provides a fixed environment for building on Linux.
Copy link
Collaborator

@1tacocat1 1tacocat1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some of the past work linked docs to @cosdon 's fork. Should be updated.

cli/README.md Outdated Show resolved Hide resolved
cli/README.md Outdated Show resolved Hide resolved
cli/README.md Outdated Show resolved Hide resolved
cli/package.json Outdated Show resolved Hide resolved
@1tacocat1
Copy link
Collaborator

looks good to me but @cosdon should look at to verify

Copy link
Collaborator

@cosdon cosdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cosdon cosdon merged commit 6a26466 into nowsecure:main Aug 21, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants