oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.47k stars 2.78k forks source link

bun install not working on github action #8854

Open Hamziss opened 9 months ago

Hamziss commented 9 months ago

What version of Bun is running?

1.0.26+c75e768a6

What platform is your computer?

Linux 5.15.0-92-generic x86_64 x86_64

What steps can reproduce the bug?

running a github action with this workflow:

name: Node.js CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: self-hosted

    strategy:
      matrix:
        node-version: [20.x]
        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/

    steps:
      - uses: actions/checkout@v3
      - uses: oven-sh/setup-bun@v1
        with:
          bun-version: latest

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node-version }}
          cache: "npm"

      - run: bun install --no-save    #<--- this fails
      - run: |
          touch .env
          echo "${{ secrets.ENV_FILE_CONTENT }}" > .env
      - run: npm run build
      ...

What is the expected behavior?

action pass

What do you see instead?

/home/ubuntu/jozdan-api-runner/_work/_temp/2d14f064-b212-4f72-93ee-d0813556be7a.sh: line 1: 1008843 Illegal instruction (core dumped) bun install

Capture-2024-02-11-175157

Additional information

No response

Electroid commented 9 months ago

Would it be possible to share the content of your package.json?

Hamziss commented 9 months ago

Would it be possible to share the content of your package.json?

sure here we go

{
    "name": "expressjs-typescript-prisma-boilerplate",
    "version": "2.0.4",
    "packageManager": "pnpm@7.25.0",
    "description": "expressjs typescript boilerplate with prisma",
    "main": "index.ts",
    "scripts": {
        "prepare": "is-ci || husky install",
        "prebuild": "npm run clean:build",
        "build": "npm run prisma:generate && tsc --build --verbose tsconfig.build.json && tsc-alias -p tsconfig.json",
        "start": "NODE_ENV=production FORCE_COLOR=2 node ./dist/index.js",
        "dev": "npm run prisma:generate && ts-node-dev --project tsconfig.dev.json -r tsconfig-paths/register --transpile-only --respawn --exit-child src/index.ts",
        "test:env": "npm run prisma:generate && NODE_ENV=test ts-node-dev --project tsconfig.dev.json -r tsconfig-paths/register --transpile-only --respawn --exit-child src/index.ts",
        "prod": "npm run build && npm run start",
        "clean": "rm -rf node_modules coverage dist .nyc_output",
        "clean:build": "rm -rf dist",
        "lint": "eslint --ignore-path .eslintignore ./ --ext .ts,.js",
        "lint:fix": "eslint --ignore-path .eslintignore ./ --fix --ext .ts,.js",
        "format": "prettier --ignore-path .prettierignore --write \"**/*.+(ts|js)\"",
        "prisma:generate": "npx prisma generate",
        "prisma:migrate": "npx prisma migrate dev --name init",
        "prisma:seed": "npx prisma db seed",
        "prisma:studio": "npx prisma studio",
        "check:types": "tsc --noEmit",
        "commit": "git-cz",
        "test": "jest",
        "test:e2e": "jest -c jest.config.e2e.ts",
        "test:integration": "jest -c jest.config.integration.ts",
        "test:unit": "jest -c jest.config.unit.ts"
    },
    "prisma": {
        "seed": "ts-node-dev -r tsconfig-paths/register --transpile-only prisma/seed.ts"
    },
    "config": {
        "commitizen": {
            "path": "cz-conventional-changelog"
        }
    },
    "author": "akhil chandran",
    "engines": {
        "node": ">=16.0.0"
    },
    "repository": "git@github.com:akhil-neoito/expressjs-typescript-prisma-boilerplate.git",
    "keywords": [
        "NodeJS",
        "TypeScript",
        "express",
        "prisma",
        "boilerplate"
    ],
    "license": "MIT",
    "dependencies": {
        "@prisma/client": "^5.1.1",
        "axios": "^1.4.0",
        "bcrypt": "^5.1.1",
        "body-parser": "^1.20.2",
        "class-transformer": "^0.5.1",
        "class-validator": "^0.14.0",
        "cookie-parser": "^1.4.6",
        "cors": "^2.8.5",
        "dayjs": "^1.11.10",
        "dotenv": "^16.3.1",
        "envalid": "^7.3.1",
        "express": "^4.18.2",
        "express-jwt": "^8.4.1",
        "helmet": "^7.0.0",
        "jsonwebtoken": "^9.0.2",
        "jwk-to-pem": "^2.0.5",
        "jwks-rsa": "^3.0.1",
        "morgan": "^1.10.0",
        "nocache": "^4.0.0",
        "nodemailer": "^6.9.8",
        "nodemon": "^3.0.1",
        "winston": "^3.10.0"
    },
    "devDependencies": {
        "@commitlint/cli": "^17.6.7",
        "@commitlint/config-conventional": "^17.6.7",
        "@faker-js/faker": "^8.0.2",
        "@swc/core": "^1.3.74",
        "@swc/helpers": "^0.5.1",
        "@types/bcrypt": "^5.0.2",
        "@types/cors": "^2.8.17",
        "@types/dotenv": "^6.1.1",
        "@types/express": "^4.17.17",
        "@types/jest": "^29.5.3",
        "@types/jsonwebtoken": "^9.0.2",
        "@types/jwk-to-pem": "^2.0.1",
        "@types/morgan": "^1.9.4",
        "@types/node": "^20.4.8",
        "@types/superagent": "4.1.18",
        "@types/supertest": "^2.0.12",
        "@typescript-eslint/eslint-plugin": "^5.48.2",
        "chalk": "4.1.2",
        "commitizen": "^4.3.0",
        "eslint": "^8.46.0",
        "eslint-config-prettier": "^9.0.0",
        "eslint-config-standard-with-typescript": "^37.0.0",
        "eslint-plugin-import": "^2.28.0",
        "eslint-plugin-n": "^16.0.1",
        "eslint-plugin-prettier": "^5.0.0",
        "eslint-plugin-promise": "^6.1.1",
        "eslint-plugin-unicorn": "^48.0.1",
        "express-jsdoc-swagger": "^1.8.0",
        "husky": "^8.0.3",
        "is-ci": "^3.0.1",
        "jest": "^29.6.2",
        "lint-staged": "^13.2.3",
        "node-notifier": "^10.0.1",
        "prettier": "^3.0.1",
        "prisma": "^5.1.1",
        "supertest": "^6.3.3",
        "ts-jest": "^29.1.1",
        "ts-node": "^10.9.1",
        "ts-node-dev": "^2.0.0",
        "tsc-alias": "^1.8.7",
        "tsc-files": "^1.1.4",
        "tsconfig-paths": "^4.2.0",
        "typescript": "^5.1.6"
    },
    "optionalDependencies": {
        "fsevents": "2.3.2"
    }
}
nektro commented 1 month ago

what do you get if you run cat /proc/cpuinfo on this machine?