Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/build-cross-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ jobs:

name: "Python ${{ matrix.version }} Linux ${{ matrix.target }} on ${{ matrix.host }}"

if: |
( matrix.host == matrix.target && inputs.kind == "native" ) ||
( matrix.host != matrix.target && inputs.kind == "cross" )
# if: ${{ ( matrix.host == matrix.target && inputs.kind == 'native' ) || ( matrix.host != matrix.target && inputs.kind == 'cross' ) }}

runs-on:
- ${{ (contains(matrix.host, "x86_64") && "ubuntu-24.04") || "ubuntu-24.04-arm" }}
- ${{ (contains(matrix.host, 'x86_64') && 'ubuntu-24.04') || 'ubuntu-24.04-arm' }}

env:
RELENV_DATA: ${{ github.workspace }}
Expand Down
53 changes: 40 additions & 13 deletions .github/workflows/build-native-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,30 @@ on:

jobs:

build_linux:
download-dependencies:
name: Download Python Build Dependencies
runs-on:
- ubuntu-24.04
strategy:
fail-fast: true
env:
RELENV_DATA: ${{ github.workspace }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Download Dependencies
run: |
python3 -m relenv build --download-only
- name: Cache Dependencies
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/download
key: ${{ github.run_id }}-dependencies

build_linux:
strategy:
fail-fast: false
matrix:
Expand All @@ -28,16 +50,16 @@ jobs:
target: x86_64
- host: aarch64
target: aarch64

needs:
- download-dependencies
name: "Python ${{ matrix.version }} Linux ${{ matrix.target }} on ${{ matrix.host }}"
runs-on:
- ${{ (contains(matrix.host, 'x86_64') && 'ubuntu-24.04') || 'ubuntu-24.04-arm' }}

env:
RELENV_DATA: ${{ github.workspace }}

steps:
- name: "Throttle Builds"
if: false
shell: bash
run: |
t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(0, 600)))'); echo "Sleeping $t seconds"; sleep "$t"
Expand All @@ -61,6 +83,12 @@ jobs:
venv/bin/python3 --version
venv/bin/python3 -c 'import os; print(os.name)'

- name: Restore Cached Dependencies
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/download
key: ${{ github.run_id }}-dependencies

- name: Build
run: |
venv/bin/python3 -m relenv build --no-pretty --arch=${{ matrix.target }} --python=${{ matrix.version }}
Expand All @@ -83,9 +111,7 @@ jobs:

build_macos_12_x86_64:
name: "Python macOS"

runs-on: macos-13

strategy:
fail-fast: false
matrix:
Expand All @@ -96,12 +122,11 @@ jobs:
- 3.13.5
arch:
- x86_64

env:
RELENV_DATA: ${{ github.workspace }}

steps:
- name: "Throttle Builds"
if: false
shell: bash
run: |
t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(0, 600)))'); echo "Sleeping $t seconds"; sleep "$t"
Expand Down Expand Up @@ -160,11 +185,15 @@ jobs:
- 3.13.5
arch:
- arm64

env:
RELENV_DATA: ${{ github.workspace }}

steps:
- name: "Throttle Builds"
if: false
shell: bash
run: |
t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(0, 600)))'); echo "Sleeping $t seconds"; sleep "$t"

- uses: actions/checkout@v3

- name: Patch include
Expand Down Expand Up @@ -207,7 +236,6 @@ jobs:
build_windows:
name: "Python Windows"
runs-on: windows-latest

strategy:
fail-fast: false
matrix:
Expand All @@ -219,12 +247,11 @@ jobs:
arch:
- amd64
- x86

env:
RELENV_DATA: ${{ github.workspace }}

steps:
- name: "Throttle Builds"
if: false
shell: bash
run: |
t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(0, 600)))'); echo "Sleeping $t seconds"; sleep "$t"
Expand Down
2 changes: 1 addition & 1 deletion relenv/build/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ def __call__(
steps = self.recipies

failures = self.check_prereqs()
if failures:
if not download_only and failures:
for _ in failures:
sys.stderr.write(f"{_}\n")
sys.stderr.flush()
Expand Down
Loading