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
45 changes: 42 additions & 3 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@ jobs:
matrix:
include:
- os-name: Linux
runner: [self-hosted, 1ES.Pool=1es-gh-hb120-pool]
runner: [self-hosted, 1ES.Pool=1es-gh-hb120-pool, 'JobId=qdk_chemistry-linux-py3.10-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}']
build-parallel: 120
uarch: x86-64-v3
python-version: '3.10'
cpp-test-threads: 2
python-test-threads: 2
- os-name: Linux
runner: [self-hosted, 1ES.Pool=1es-gh-hb120-pool]
runner: [self-hosted, 1ES.Pool=1es-gh-hb120-pool, 'JobId=qdk_chemistry-linux-py3.13-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}']
build-parallel: 120
uarch: x86-64-v3
python-version: '3.13'
cpp-test-threads: 2
python-test-threads: 2
- os-name: Linux
runner: [self-hosted, 1ES.Pool=1es-gh-hb120-pool]
runner: [self-hosted, 1ES.Pool=1es-gh-hb120-pool, 'JobId=qdk_chemistry-linux-py3.14-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}']
build-parallel: 120
uarch: x86-64-v3
python-version: '3.14'
Expand All @@ -94,6 +94,29 @@ jobs:
CMAKE_BUILD_PARALLEL_LEVEL: ${{ matrix.build-parallel }}
QDK_UARCH: ${{ matrix.uarch }}
steps:
- name: Free up disk space (Linux)
if: matrix.os-name == 'Linux'
run: |
echo "=== Disk space before cleanup ==="
df -h

# Remove unnecessary large packages commonly present on GitHub runners
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /opt/ghc || true
sudo rm -rf /opt/hostedtoolcache/go || true
sudo rm -rf /opt/hostedtoolcache/Ruby || true

# Clean apt cache
sudo apt-get clean || true

echo "=== Disk space after cleanup ==="
df -h

echo "Workspace path: ${{ github.workspace }}"
echo "Space available:"
df -h "${{ github.workspace }}"

- name: Checkout repository
uses: actions/checkout@v4
with:
Expand All @@ -114,6 +137,22 @@ jobs:
- name: Install Linux system packages
if: matrix.os-name == 'Linux'
run: |
# Wait for any existing apt/dpkg processes to finish (e.g., unattended-upgrades)
MAX_WAIT_SECONDS=300
WAIT_INTERVAL_SECONDS=5
ELAPSED_SECONDS=0
while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do
echo "Waiting for dpkg lock to be released (elapsed: ${ELAPSED_SECONDS}s, timeout: ${MAX_WAIT_SECONDS}s)..."
# Log the process(es) currently holding the dpkg lock, if possible
sudo fuser -v /var/lib/dpkg/lock-frontend || true
sleep "${WAIT_INTERVAL_SECONDS}"
ELAPSED_SECONDS=$((ELAPSED_SECONDS + WAIT_INTERVAL_SECONDS))
if [ "${ELAPSED_SECONDS}" -ge "${MAX_WAIT_SECONDS}" ]; then
echo "Error: dpkg lock was not released after ${MAX_WAIT_SECONDS} seconds. Failing step."
exit 1
fi
done

sudo apt-get update
sudo apt-get install -y \
build-essential \
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/python-wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ extends:
os: ${{ target.os }}

timeoutInMinutes: 480
displayName: Build ${{ target.march }} wheels
displayName: Build ${{ target.march }} ${{ target.os }} wheels
variables:
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:/usr/local/lib
strategy:
Expand Down
26 changes: 26 additions & 0 deletions .pipelines/templates/build-pip-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,38 @@ steps:
- checkout: self
persistCredentials: true
path: qdk-chemistry
fetchDepth: 1
retryCountOnTaskFailure: 3

- task: PipAuthenticate@1
displayName: Pip Authenticate
inputs:
artifactFeeds: ""

- ${{ if eq(parameters.macBuild, 'OFF') }}:
- script: |
echo "=== Disk space before cleanup ==="
df -h

# Remove unnecessary large packages commonly present on GitHub runners
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /opt/ghc || true
sudo rm -rf /opt/hostedtoolcache/go || true
sudo rm -rf /opt/hostedtoolcache/Ruby || true

# Clean apt cache
sudo apt-get clean || true

echo "=== Disk space after cleanup ==="
df -h

echo "Workspace path: $(Agent.BuildDirectory)"
echo "Space available:"
df -h "$(Agent.BuildDirectory)"
displayName: Free up disk space (Linux)


# Check if user provided a development tag for release and validate before building wheels.
# If a development tag is provided and is valid, the VERSION file in the top level directory
# will be updated to include the dev tag before publishing to PyPI.
Expand Down
Loading