Skip to content

Commit

Permalink
[CI] Fix macOS GitHub CI
Browse files Browse the repository at this point in the history
Summary:
[ENG-5678](https://linear.app/comm/issue/ENG-5678)

The general error that breaks the github CI is the same as in this [issue](electron/forge#2807) - `distutils` was removed in a newer version of python and so one of the dependencies postinstall script breaks because of that. This diff fixes that by additionaly installing an older (3.10) version of python before installing the dependencies.

Note that I'm still not sure why the CI is sometimes successful but I'm hoping this should fix the errors.

INFO: Most native (written in C++) js modules are built with something called `node-gyp`. It's written in python and used at build time in postinstall scripts. That's why we need to mess with python.

Test Plan: Tested on a GitHub fork. Without this changes CI failed. After this changes tried running it 3 times and it succeded every time.

Reviewers: atul, ashoat, tomek

Reviewed By: ashoat

Subscribers: wyilio

Differential Revision: https://phab.comm.dev/D9760
  • Loading branch information
MichalGniadek committed Nov 10, 2023
1 parent 52fe10d commit 2df5130
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/android_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
working-directory: ./scripts
run: sudo ./install_protobuf.sh

- name: Fix node-gyp
run: python3 -m pip install packaging setuptools

- name: yarn ci-cleaninstall
run: yarn ci-cleaninstall

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/android_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
working-directory: ./scripts
run: sudo ./install_protobuf.sh

- name: Fix node-gyp
run: python3 -m pip install packaging setuptools

- name: yarn ci-cleaninstall
run: yarn ci-cleaninstall

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/eslint_flow_jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
working-directory: ./scripts
run: sudo ./install_protobuf.sh

- name: Fix node-gyp
run: python3 -m pip install packaging setuptools

- name: yarn ci-cleaninstall
run: yarn ci-cleaninstall

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ios_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
- name: brew install protobuf
run: brew install protobuf

- name: Fix node-gyp
run: python3 -m pip install packaging setuptools

- name: yarn ci-cleaninstall
run: yarn ci-cleaninstall

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ios_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
- name: brew install protobuf
run: brew install protobuf

- name: Fix node-gyp
run: python3 -m pip install packaging setuptools

- name: yarn ci-cleaninstall
run: yarn ci-cleaninstall

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/jsi_codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
working-directory: ./scripts
run: sudo ./install_protobuf.sh

- name: Fix node-gyp
run: python3 -m pip install packaging setuptools

- name: yarn ci-cleaninstall
run: yarn ci-cleaninstall

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/macos_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Fix node-gyp
run: python3 -m pip install packaging setuptools

- name: Install Developer certificate
env:
MACOS_BUILD_CERTIFICATE_BASE64: ${{ secrets.MACOS_BUILD_CERTIFICATE_BASE64 }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/remove_harbormaster_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
working-directory: ./scripts
run: sudo ./install_protobuf.sh

- name: Fix node-gyp
run: python3 -m pip install packaging setuptools

- name: yarn ci-cleaninstall
run: yarn ci-cleaninstall

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/windows_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Fix node-gyp
run: python3 -m pip install packaging setuptools

- name: yarn ci-cleaninstall
run: yarn ci-cleaninstall

Expand Down

0 comments on commit 2df5130

Please sign in to comment.