Skip to content

Commit

Permalink
CI: Run pip install setuptools before yarn install
Browse files Browse the repository at this point in the history
Currently, `electron-builder` eventually pulls in `node-gyp@9` via
`@electron/rebuild.  However, newer versions of Python (>= 3.12) no longer
ship with `distutils` built-in.  That means we need `node-gyp@10` or higher
in those cases.  Trying to manually override the installed `node-gyp`
version leads to `yarn install` hanging instead, so we will need to wait
for `@electron/rebuild` to upgrade.

Work around the issue by manually installing `setuptools` (to get
`distutils`) in CI, so we can wait until the dependencies get fixed.

Signed-off-by: Mark Yen <mark.yen@suse.com>
  • Loading branch information
mook-as committed Sep 23, 2024
1 parent 40c67a2 commit a7c8a91
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docker-cli-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
with:
go-version-file: go.work
cache-dependency-path: src/go/**/go.sum
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- run: pip install setuptools

- run: yarn install --frozen-lockfile

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/go-work-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ jobs:
with:
go-version-file: go.work
cache-dependency-path: '**/go.sum'
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- run: pip install setuptools
- name: Determine go.mod files
id: go-files
run: >-
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/linux-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ jobs:
with:
go-version-file: go.work
cache-dependency-path: src/go/**/go.sum
# For now, we don't need to `pip install setuptools` because we're not on
# Python 3.12; we will need that later, however.
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- run: pip install setuptools
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Disable admin-access before start up
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macM1-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- run: pip install setuptools
- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- uses: actions/setup-go@v5
with:
go-version-file: go.work
Expand Down Expand Up @@ -176,6 +177,11 @@ jobs:
with:
node-version-file: package.json
cache: yarn
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- run: pip install setuptools
# Needs a network timeout for macos & windows. See https://github.com/yarnpkg/yarn/issues/8242 for more info
- run: yarn install --frozen-lockfile --network-timeout 1000000
- uses: actions/download-artifact@v4
Expand Down Expand Up @@ -238,6 +244,11 @@ jobs:
with:
node-version-file: package.json
cache: yarn
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- run: pip install setuptools
# Needs a network timeout for macos & windows. See https://github.com/yarnpkg/yarn/issues/8242 for more info
- run: yarn install --frozen-lockfile --network-timeout 1000000
- uses: actions/download-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rddepman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip

- run: pip install setuptools
- run: yarn install --frozen-lockfile
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release-merge-to-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ jobs:
with:
go-version-file: go.work
cache-dependency-path: src/go/**/go.sum
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- run: pip install setuptools

- run: yarn install --frozen-lockfile

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/screenshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- uses: actions/setup-go@v5
with:
go-version-file: go.work
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- uses: actions/setup-node@v4
with:
node-version-file: package.json
Expand Down Expand Up @@ -55,5 +56,10 @@ jobs:
with:
go-version-file: go.work
cache-dependency-path: src/go/**/go.sum
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- run: pip install setuptools
- run: yarn install --frozen-lockfile
- run: yarn lint:nofix
1 change: 1 addition & 0 deletions .github/workflows/ucmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip

- uses: actions/setup-go@v5
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/upgrade-generate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- uses: actions/setup-go@v5
with:
go-version-file: go.work
Expand Down Expand Up @@ -90,6 +91,11 @@ jobs:
with:
go-version-file: go.work
cache-dependency-path: src/go/**/go.sum
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- run: pip install setuptools
- run: yarn install --frozen-lockfile
- name: Download installer (msi)
id: msi
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windows-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- run: pip install setuptools
- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/wsl-helper-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
with:
go-version-file: go.work
cache-dependency-path: src/go/wsl-helper/go.sum
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- run: pip install setuptools
- run: yarn install --frozen-lockfile
- name: Build Windows
run: go build .
Expand Down

0 comments on commit a7c8a91

Please sign in to comment.