Skip to content

Commit

Permalink
Update main.yml fixing the build jobs to initialize with venv
Browse files Browse the repository at this point in the history
  • Loading branch information
whitphx committed Jan 17, 2024
1 parent 1053492 commit 72cc35b
Showing 1 changed file with 36 additions and 9 deletions.
45 changes: 36 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ jobs:
with:
node-version-file: .nvmrc
cache: 'yarn'
- run: yarn install --frozen-lockfile

# We require protoc >= 3.20, but Ubuntu 22.04 - the OS that these Github
# Actions are running as of 2023.05.03 - doesn't have recent versions
Expand Down Expand Up @@ -291,6 +290,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true

## Set up Python and Poetry environment
- name: Set up Python ${{ env.python-version }}
Expand All @@ -311,7 +312,7 @@ jobs:
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Configure poetry
run: poetry config virtualenvs.in-project true
run: poetry config virtualenvs.in-project false

- name: Set up cache
uses: actions/cache@v3
Expand All @@ -324,6 +325,9 @@ jobs:
if: steps.cache.outputs.cache-hit == 'true'
run: timeout 10s pip --version || rm -rf .venv

- name: Create virtualenv
run: python -m venv .venv

## Set up Node environment
- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -352,7 +356,9 @@ jobs:
- name: Set PUBLIC_URL
run: echo "PUBLIC_URL=." >> $GITHUB_ENV
- name: Build @stlite/kernel
run: make kernel
run: |
. .venv/bin/activate
make kernel
- name: Package
working-directory: packages/kernel
Expand Down Expand Up @@ -414,6 +420,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true

## Set up Python and Poetry environment
- name: Set up Python ${{ env.python-version }}
Expand All @@ -434,7 +442,7 @@ jobs:
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Configure poetry
run: poetry config virtualenvs.in-project true
run: poetry config virtualenvs.in-project false

- name: Set up cache
uses: actions/cache@v3
Expand All @@ -447,6 +455,9 @@ jobs:
if: steps.cache.outputs.cache-hit == 'true'
run: timeout 10s pip --version || rm -rf .venv

- name: Create virtualenv
run: python -m venv .venv

## Set up Node environment
- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -475,7 +486,9 @@ jobs:
- name: Set PUBLIC_URL
run: echo "PUBLIC_URL=." >> $GITHUB_ENV
- name: Build @stlite/mountable
run: make mountable
run: |
. .venv/bin/activate
make mountable
- name: Package
working-directory: packages/mountable
Expand Down Expand Up @@ -537,6 +550,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true

## Set up Python and Poetry environment
- name: Set up Python ${{ env.python-version }}
Expand All @@ -557,7 +572,7 @@ jobs:
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Configure poetry
run: poetry config virtualenvs.in-project true
run: poetry config virtualenvs.in-project false

- name: Set up cache
uses: actions/cache@v3
Expand All @@ -570,6 +585,9 @@ jobs:
if: steps.cache.outputs.cache-hit == 'true'
run: timeout 10s pip --version || rm -rf .venv

- name: Create virtualenv
run: python -m venv .venv

## Set up Node environment
- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -601,7 +619,9 @@ jobs:
if: github.ref_name == github.event.repository.default_branch
run: echo "REACT_APP_EDITOR_APP_ORIGIN=https://edit.share.stlite.net" >> $GITHUB_ENV
- name: Build @stlite/sharing
run: make sharing
run: |
. .venv/bin/activate
make sharing
- name: Upload the built directory as an artifact
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -698,6 +718,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true

## Set up Python and Poetry environment
- name: Set up Python ${{ env.python-version }}
Expand All @@ -718,7 +740,7 @@ jobs:
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Configure poetry
run: poetry config virtualenvs.in-project true
run: poetry config virtualenvs.in-project false

- name: Set up cache
uses: actions/cache@v3
Expand All @@ -731,6 +753,9 @@ jobs:
if: steps.cache.outputs.cache-hit == 'true'
run: timeout 10s pip --version || rm -rf .venv

- name: Create virtualenv
run: python -m venv .venv

## Set up Node environment
- uses: actions/setup-node@v3
with:
Expand All @@ -756,7 +781,9 @@ jobs:

## Build and deploy @stlite/desktop
- name: Build @stlite/desktop
run: make desktop
run: |
. .venv/bin/activate
make desktop
- name: Check if electron-builder works
working-directory: packages/desktop
Expand Down

0 comments on commit 72cc35b

Please sign in to comment.