Skip to content

Commit

Permalink
Split testing to a separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
overfl0 committed Apr 23, 2023
1 parent e96fba2 commit 16bae39
Showing 1 changed file with 49 additions and 16 deletions.
65 changes: 49 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ jobs:
- name: Check out repository code
uses: actions/checkout@v3

- name: Create the directory
run: mkdir "@Pythia"

- name: Download the interpreters
uses: actions/download-artifact@v3
with:
name: _Internal_Python_Interpreters

- name: Create the directory
run: mkdir "@Pythia"

- name: Untar the interpreter
run: tar xf ../python-${{ env.PYTHON_VERSION }}-${{ runner.os }}.tar
working-directory: "@Pythia"
Expand All @@ -93,19 +93,6 @@ jobs:
if-no-files-found: error
retention-days: 1

# Note: we're running tests after uploading to make 100% sure we don't
# corrupt the environment by running tests.
# We could do this in another job but doing this here saves us a few seconds
- name: Install multilib for compiling 32bit Cython extensions (in tests)
if: runner.os == 'Linux' && matrix.arch == 'x86'
run: sudo apt install -y gcc-multilib

- name: Copy templates
run: python tools/build.py copy_templates ${{ env.PYTHON_VERSION }}

- name: Run basic tests
run: python tools/build.py run_tests ${{ env.PYTHON_VERSION }} ${{ matrix.arch }} ${{ runner.os }}

Build-PBO:
runs-on: windows-latest
steps:
Expand Down Expand Up @@ -137,8 +124,54 @@ jobs:
if-no-files-found: error
retention-days: 1

Test-Binaries:
needs: Build-Binaries
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2019, ubuntu-20.04]
arch: [x64, x86]

steps:
- uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Check out repository code
uses: actions/checkout@v3

- name: Create the directory
run: mkdir "@Pythia"

- name: Download the interpreters
uses: actions/download-artifact@v3
with:
name: _Internal_Python_Interpreters

- name: Untar the interpreter
run: tar xf ../python-${{ env.PYTHON_VERSION }}-${{ runner.os }}.tar
working-directory: "@Pythia"

- name: Download the binaries
uses: actions/download-artifact@v3
with:
name: _Internal_Pythia_Binaries
path: "@Pythia"

- name: Install multilib for compiling 32bit Cython extensions (in tests)
if: runner.os == 'Linux' && matrix.arch == 'x86'
run: sudo apt install -y gcc-multilib

- name: Copy templates
run: python tools/build.py copy_templates ${{ env.PYTHON_VERSION }}

- name: Run basic tests
run: python tools/build.py run_tests ${{ env.PYTHON_VERSION }} ${{ matrix.arch }} ${{ runner.os }}

Consolidate:
needs:
- Create-Interpreters
- Build-Binaries
- Build-PBO
runs-on: ubuntu-latest
Expand Down

0 comments on commit 16bae39

Please sign in to comment.