From f842d93e8bcc039f398f86471c2e561c8d85b7d3 Mon Sep 17 00:00:00 2001 From: Mateusz Duda Date: Tue, 28 May 2024 17:43:15 +0200 Subject: [PATCH] hmm --- .github/workflows/test-and-deploy-to-npm.yml | 45 +++++++++++++++++--- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-and-deploy-to-npm.yml b/.github/workflows/test-and-deploy-to-npm.yml index 3ccd819..c1ac0b4 100644 --- a/.github/workflows/test-and-deploy-to-npm.yml +++ b/.github/workflows/test-and-deploy-to-npm.yml @@ -15,19 +15,54 @@ jobs: run: working-directory: ./ steps: - - uses: actions/checkout@v4 + - name: Install Dependencies for Ubuntu + # git >= 2.18 required for actions/checkout git support + run: apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:git-core/ppa && apt-get update && apt-get install -y git build-essential clang libssl-dev libkrb5-dev libc++-dev wget + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + + - name: Setup python 3.6 + env: + CC: clang + CXX: clang++ + run: | + mkdir ~/python + cd ~/python + wget https://www.python.org/ftp/python/3.6.15/Python-3.6.15.tgz + tar -xvf Python-3.6.15.tgz + cd Python-3.6.15 + ./configure + make + make install + + - uses: actions/checkout@v3 with: submodules: true + - run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v3 with: node-version: '18.19.0' registry-url: 'https://registry.npmjs.org' - - name: Install npm dependencies - run: npm ci + + - name: Install + env: + CC: clang + CXX: clang++ + npm_config_clang: 1 + GYP_DEFINES: use_obsolete_asm=true + # There is a race condition in node/generate that needs to be fixed + # Node 16 changed the logic it uses to select it's UID which means to make node run as root and not 1001, we need to chwon the current directory. More Details: + # https://stackoverflow.com/questions/70298238/getting-eaccess-when-running-npm-8-as-root + run: | + chown root.root -R . + npm set unsafe-perm true + node utils/retry npm install + + - name: Create scope-tags build run: npx tsc # Just to not display git warning in unit test output @@ -45,7 +80,7 @@ jobs: runs-on: ubuntu-latest if: ${{ needs.run-tests.outputs.version == '1' }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: actions/setup-node@v4 with: node-version: '18.17.1'