diff --git a/.github/actions/tket-c-api/action.yml b/.github/actions/tket-c-api/action.yml index 4fc44262d..e550f8525 100644 --- a/.github/actions/tket-c-api/action.yml +++ b/.github/actions/tket-c-api/action.yml @@ -1,5 +1,5 @@ name: "Install tket-c-api C++ library" -description: "Retrieve cached tket-c-api C++ library or build if needed." +description: "Download pre-built tket-c-api library from Artifactory." inputs: install-path: @@ -12,221 +12,44 @@ inputs: runs: using: composite steps: - - name: Attempt to retrieve cached tket-c-api - uses: actions/cache/restore@v4 - id: cache - with: - path: ${{ inputs.install-path }} - key: ${{ runner.os }}-${{ inputs.target }}-${{ hashFiles('tket1-passes/conanfile.txt') }}-${{ hashFiles('tket1-passes/conan-profiles/**') }}-${{ hashFiles('.github/actions/tket-c-api/action.yml') }} - - name: Install conan - if: steps.cache.outputs.cache-hit != 'true' uses: conan-io/setup-conan@v1 with: cache_packages: true - name: Set up conan remote - if: steps.cache.outputs.cache-hit != 'true' - shell: bash - run: | - conan remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0 - - - name: Install cross-compilation toolchains - if: steps.cache.outputs.cache-hit != 'true' shell: bash run: | - TARGET="${{ inputs.target }}" - - # Install cross-compilation toolchains based on target - case "$TARGET" in - aarch64-unknown-linux-gnu|aarch64-unknown-linux-musl) - sudo apt-get update - sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu - ;; - armv7-unknown-linux-gnueabihf|armv7-unknown-linux-musleabihf) - sudo apt-get update - sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf - ;; - i686-unknown-linux-gnu|i686-unknown-linux-musl) - sudo apt-get update - sudo apt-get install -y gcc-multilib g++-multilib - ;; - x86_64-unknown-linux-gnu|x86_64-unknown-linux-musl) - # Native compilation, no cross-compiler needed - ;; - *) - # For other targets, check if cross-compilation is needed - if [[ "$TARGET" == *"linux"* ]] && [[ "$TARGET" != *"x86_64"* ]]; then - echo "Warning: Unknown Linux target $TARGET, cross-compilation may fail" - fi - ;; - esac + conan profile detect --force || true + conan remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0 || true - - name: Determine conan profile - if: steps.cache.outputs.cache-hit != 'true' - id: conan-profile + - name: Download and install tket-c-api from Artifactory shell: bash run: | - TARGET="${{ inputs.target }}" - PROFILE="" - - case "$TARGET" in - aarch64-unknown-linux-gnu) - PROFILE="linux-armv8-gcc14" - ;; - aarch64-unknown-linux-musl) - PROFILE="linux-armv8-gcc14" - ;; - armv7-unknown-linux-gnueabihf) - PROFILE="linux-armv7-gcc14" - ;; - armv7-unknown-linux-musleabihf) - PROFILE="linux-armv7-gcc14" - ;; - i686-unknown-linux-gnu) - PROFILE="linux-i686-gcc14" - ;; - i686-unknown-linux-musl) - PROFILE="linux-i686-gcc14" - ;; - x86_64-unknown-linux-gnu) - PROFILE="linux-x86_64-gcc13" - ;; - x86_64-unknown-linux-musl) - PROFILE="linux-x86_64-gcc13" - ;; - x86_64-pc-windows-msvc) - PROFILE="windows-2025" - ;; - *) - # For non-Linux targets or if no match, let conan generate a default profile - if [[ "$TARGET" == *"apple"* ]] && [[ "$TARGET" == *"aarch64"* ]]; then - PROFILE="macos-15" - elif [[ "$TARGET" == *"apple"* ]] && [[ "$TARGET" == *"x86_64"* ]]; then - PROFILE="macos-15-intel" - elif [[ "$TARGET" == *"windows"* ]] && [[ "$TARGET" == *"msvc"* ]]; then - PROFILE="windows-2025" - elif [[ "$TARGET" == *"armv8"* ]] || [[ "$TARGET" == *"aarch64"* ]]; then - PROFILE="linux-armv8-gcc14" - elif [[ "$TARGET" == *"x86_64"* ]]; then - PROFILE="linux-x86_64-gcc13" - else - PROFILE="" - fi - ;; - esac - - if [ -z "$PROFILE" ]; then - echo "No profile found for target: $TARGET, using default" - echo "profile=" >> $GITHUB_OUTPUT - echo "use_profile=false" >> $GITHUB_OUTPUT - else - # Check if profile exists in tket1-passes/conan-profiles directory - if [ -f "tket1-passes/conan-profiles/$PROFILE" ]; then - PROFILE_PATH="tket1-passes/conan-profiles/$PROFILE" - echo "profile=$PROFILE_PATH" >> $GITHUB_OUTPUT - echo "use_profile=true" >> $GITHUB_OUTPUT - echo "Selected profile: $PROFILE_PATH" - else - echo "Profile $PROFILE not found in tket1-passes/conan-profiles/, using default" - echo "profile=" >> $GITHUB_OUTPUT - echo "use_profile=false" >> $GITHUB_OUTPUT - fi - fi - - - name: Build and install tket-c-api - if: steps.cache.outputs.cache-hit != 'true' && runner.os != 'Windows' - shell: bash - run: | - cd tket1-passes - mkdir -p ${{ inputs.install-path }} - - # Set up cross-compilation environment variables if needed - TARGET="${{ inputs.target }}" - export CC="" - export CXX="" - - case "$TARGET" in - aarch64-unknown-linux-gnu|aarch64-unknown-linux-musl) - export CC="aarch64-linux-gnu-gcc" - export CXX="aarch64-linux-gnu-g++" - ;; - armv7-unknown-linux-gnueabihf|armv7-unknown-linux-musleabihf) - export CC="arm-linux-gnueabihf-gcc" - export CXX="arm-linux-gnueabihf-g++" - ;; - i686-unknown-linux-gnu|i686-unknown-linux-musl) - # For i686, conan profile with arch=x86 should handle -m32 automatically - # No need to set CC/CXX explicitly - ;; - esac - - if [ -n "$CC" ]; then - echo "Using cross-compiler: CC=$CC, CXX=$CXX" - # Verify cross-compiler is available and working - $CC --version || echo "Warning: Failed to get $CC version" + # Read the version from conanfile.txt + TKET_C_API_VERSION=$(grep "tket-c-api/" tket1-passes/conanfile.txt | cut -d'/' -f2 | cut -d'@' -f1) + echo "Installing tket-c-api version: $TKET_C_API_VERSION" + + # Install the pre-built tket-c-api package from Artifactory + conan install --requires="tket-c-api/${TKET_C_API_VERSION}@tket/stable" \ + -o "tket-c-api/*:shared=True" \ + --build=missing \ + --format=json > conan_install.json + + # Extract the package folder path from the conan output + PACKAGE_FOLDER=$(cat conan_install.json | python3 -c "import sys, json; nodes = json.load(sys.stdin)['graph']['nodes']; print(next((v['package_folder'] for k, v in nodes.items() if 'tket-c-api' in v.get('ref', '')), ''))") + echo "Package folder: $PACKAGE_FOLDER" + + if [ -z "$PACKAGE_FOLDER" ] || [ "$PACKAGE_FOLDER" = "null" ]; then + echo "Error: Could not find tket-c-api package folder" + exit 1 fi - # Build conan install command - CONAN_CMD="conan install . --build=missing --options=\"tket-c-api/*:shared=True\"" + # Copy the library files to the expected location + mkdir -p "${{ inputs.install-path }}" + cp -r "$PACKAGE_FOLDER/"* "${{ inputs.install-path }}/" - if [ "${{ steps.conan-profile.outputs.use_profile }}" == "true" ]; then - CONAN_CMD="$CONAN_CMD --profile=${{ github.workspace }}/${{ steps.conan-profile.outputs.profile }}" - echo "Using profile: ${{ steps.conan-profile.outputs.profile }}" - else - echo "Using default conan profile" - fi - - CONAN_CMD="$CONAN_CMD --format=json" - echo "Running: $CONAN_CMD" - - CONAN_OUTPUT=$(eval $CONAN_CMD) - CONAN_LIB_FOLDER=$(echo "$CONAN_OUTPUT" | jq -r ".graph.nodes.\"1\".package_folder") - echo "CONAN_LIB_FOLDER: $CONAN_LIB_FOLDER" - cp -r "$CONAN_LIB_FOLDER/"* "${{ inputs.install-path }}/" - - - name: Build and install tket-c-api (Windows) - if: steps.cache.outputs.cache-hit != 'true' && runner.os == 'Windows' - shell: pwsh - run: | - Set-Location tket1-passes - New-Item -ItemType Directory -Force -Path "${{ inputs.install-path }}" | Out-Null - - # Build conan install command - $conanCmd = "conan install . --build=missing --options=`"tket-c-api/*:shared=True`"" - - if ("${{ steps.conan-profile.outputs.use_profile }}" -eq "true") { - $profilePath = "${{ github.workspace }}/${{ steps.conan-profile.outputs.profile }}" - $conanCmd = "$conanCmd --profile=$profilePath" - Write-Host "Using profile: $profilePath" - } else { - Write-Host "Using default conan profile" - } - - Write-Host "CMake option CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON will be passed to the build" - - $conanCmd = "$conanCmd --format=json" - Write-Host "Running: $conanCmd" - - $conanOutput = Invoke-Expression $conanCmd - $conanJson = $conanOutput | ConvertFrom-Json - $conanLibFolder = $conanJson.graph.nodes.'1'.package_folder - - Write-Host "CONAN_LIB_FOLDER: $conanLibFolder" - Write-Host "Files in CONAN_LIB_FOLDER:" - - # Copy the built library files to the install path - Get-ChildItem -Path "$conanLibFolder" -Recurse -File | ForEach-Object { Write-Output $_.FullName } - Copy-Item -Recurse -Force -Path "$conanLibFolder\*" -Destination "${{ inputs.install-path }}" - Write-Host "tket-c-api library files:" - Get-ChildItem -Path "${{ inputs.install-path }}" -Recurse -File | ForEach-Object { Write-Output $_.FullName } - - - name: Upload compiled library to cache - if: steps.cache.outputs.cache-hit != 'true' - uses: actions/cache/save@v4 - with: - path: ${{ inputs.install-path }} - key: ${{ steps.cache.outputs.cache-primary-key }} + echo "tket-c-api installed to ${{ inputs.install-path }}" - name: List tket-c-api library files shell: bash diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 746144e89..363a6ff87 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -17,12 +17,6 @@ permissions: env: UV_VERSION: "0.9.7" UV_FROZEN: 1 - # Path to the cached tket-c-api library - # When this envvar is set, the `./.github/actions/tket-c-api` action **must** be run to fetch the artifacts - # This config is not required, but speeds up the build by caching the tket-c-api library - # The alternative is to install conan and remove the env var - TKET_C_API_PATH: "${{ github.workspace }}/tket-c-api" - LD_LIBRARY_PATH: ${{ github.workspace }}/tket-c-api/lib jobs: # Check if changes were made to the relevant files. @@ -48,13 +42,17 @@ jobs: with: submodules: true + - name: Install conan + uses: conan-io/setup-conan@v1 + with: + cache_packages: true - uses: extractions/setup-just@v3 with: just-version: "1.40.0" - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ env.TKET_C_API_PATH }} + cache_packages: true - name: Install uv uses: astral-sh/setup-uv@v7 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d08de2dc5..189947e3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,13 +29,6 @@ env: LLVM_VERSION: "14.0" LLVM_FEATURE_NAME: "14-0" - # Path to the cached tket-c-api library - # When this envvar is set, the `./.github/actions/tket-c-api` action **must** be run to fetch the artifacts - # This config is not required, but speeds up the build by caching the tket-c-api library - # The alternative is to install conan and remove the env var - TKET_C_API_PATH: "${{ github.workspace }}/tket-c-api" - LD_LIBRARY_PATH: ${{ github.workspace }}/tket-c-api/lib - jobs: # Check if changes were made to the relevant files. # Always returns true if running on the default branch, to ensure all changes are thoroughly checked. @@ -69,10 +62,10 @@ jobs: uses: dtolnay/rust-toolchain@stable with: components: rustfmt, clippy - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ env.TKET_C_API_PATH }} + cache_packages: true - name: Check formatting run: cargo fmt -- --check - name: Install LLVM and Clang @@ -106,10 +99,10 @@ jobs: with: version: ${{ env.LLVM_VERSION }} directory: ${{ runner.temp }}/llvm - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ env.TKET_C_API_PATH }} + cache_packages: true - name: Install Python ${{ env.PYTHON_LOWEST }} run: uv python install ${{ env.PYTHON_LOWEST }} - name: Setup dependencies @@ -134,10 +127,10 @@ jobs: - uses: mozilla-actions/sccache-action@v0.0.9 - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ env.TKET_C_API_PATH }} + cache_packages: true - uses: cargo-bins/cargo-binstall@main - name: Install cargo-codspeed run: cargo binstall cargo-codspeed --force @@ -167,10 +160,10 @@ jobs: toolchain: "stable" - name: Configure default rust toolchain run: rustup override set ${{steps.toolchain.outputs.name}} - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ env.TKET_C_API_PATH }} + cache_packages: true - uses: taiki-e/install-action@nextest - name: Build with no features run: cargo nextest r --verbose -p tket -p tket-py -p tket-qsystem --no-default-features --no-run @@ -196,10 +189,10 @@ jobs: uses: KyleMayes/install-llvm-action@v2 with: version: ${{ env.LLVM_VERSION }} - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ env.TKET_C_API_PATH }} + cache_packages: true - uses: taiki-e/install-action@nextest - name: Build with all features run: cargo nextest r --verbose --workspace --all-features --no-run @@ -230,10 +223,10 @@ jobs: uses: KyleMayes/install-llvm-action@v2 with: version: ${{ env.LLVM_VERSION }} - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ env.TKET_C_API_PATH }} + cache_packages: true - name: Configure default rust toolchain run: rustup override set ${{steps.toolchain.outputs.name}} - uses: taiki-e/install-action@nextest @@ -264,10 +257,10 @@ jobs: uses: KyleMayes/install-llvm-action@v2 with: version: ${{ env.LLVM_VERSION }} - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ env.TKET_C_API_PATH }} + cache_packages: true - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - name: Run tests with coverage instrumentation @@ -311,10 +304,10 @@ jobs: uses: KyleMayes/install-llvm-action@v2 with: version: ${{ env.LLVM_VERSION }} - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ env.TKET_C_API_PATH }} + cache_packages: true - uses: cargo-bins/cargo-binstall@main - name: Install cargo-minimal-versions run: | @@ -352,10 +345,10 @@ jobs: with: version: ${{ env.UV_VERSION }} enable-cache: true - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ env.TKET_C_API_PATH }} + cache_packages: true - name: Install Python ${{ env.PYTHON_LOWEST }} run: uv python install ${{ env.PYTHON_LOWEST }} - name: Setup dependencies diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml index 3e4a70e0b..5418ea039 100644 --- a/.github/workflows/python-wheels.yml +++ b/.github/workflows/python-wheels.yml @@ -16,6 +16,11 @@ on: types: - published workflow_dispatch: + # Test trigger + # TODO: Remove before merge + pull_request: + branches: + - "**" permissions: contents: read @@ -86,13 +91,7 @@ jobs: # manylinux: "musllinux_1_2" - runner: ubuntu-24.04 target: x86_64-unknown-linux-gnu - # Note: The runner image uses GLIBC 2.39, but we verified that the - # tket-c-api build works with GLIBC 2.34. - # - # This is a temporary workaround until we use a pre-built c-api library. - # - # - manylinux: "manylinux_2_34" + manylinux: "manylinux_2_28" test-wheels: true - runner: ubuntu-24.04 target: x86_64-unknown-linux-musl @@ -127,44 +126,10 @@ jobs: with: version: ${{ env.LLVM_VERSION }} - # Set the path to the cached tket-c-api library - # When this envvar is set, the `./.github/actions/tket-c-api` action **must** be run to fetch the artifacts - # This config is not required, but speeds up the build by caching the tket-c-api library - # The alternative is to install conan and remove the env var - - name: Compute tket-c-api paths - id: tket-paths - shell: bash - run: | - echo "RUNNER_OS=$RUNNER_OS" - WORKSPACE="${{ github.workspace }}" - - case "$RUNNER_OS" in - Windows) - echo "tket_c_api_path=$WORKSPACE\tket-c-api" >> $GITHUB_OUTPUT - echo "TKET_C_API_PATH=$WORKSPACE\tket-c-api" >> $GITHUB_ENV - echo "$WORKSPACE\tket-c-api\lib" >> $GITHUB_PATH - echo "$WORKSPACE\tket-c-api\bin" >> $GITHUB_PATH - echo "LD_LIBRARY_PATH=$WORKSPACE\tket-c-api\lib" >> $GITHUB_ENV - ;; - macOS) - echo "tket_c_api_path=$WORKSPACE/tket-c-api" >> $GITHUB_OUTPUT - echo "TKET_C_API_PATH=$WORKSPACE/tket-c-api" >> $GITHUB_ENV - echo "$WORKSPACE/tket-c-api/lib" >> $GITHUB_PATH - echo "DYLD_LIBRARY_PATH=$WORKSPACE/tket-c-api/lib" >> $GITHUB_ENV - echo "MACOSX_DEPLOYMENT_TARGET=${{ matrix.platform.macos-compatibility }}" >> $GITHUB_ENV - ;; - Linux) - echo "tket_c_api_path=$WORKSPACE/tket-c-api" >> $GITHUB_OUTPUT - echo "TKET_C_API_PATH=$WORKSPACE/tket-c-api" >> $GITHUB_ENV - echo "$WORKSPACE/tket-c-api/lib" >> $GITHUB_PATH - echo "LD_LIBRARY_PATH=$WORKSPACE/tket-c-api/lib" >> $GITHUB_ENV - ;; - esac - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ steps.tket-paths.outputs.tket_c_api_path }} - target: ${{ matrix.platform.target }} + cache_packages: true - uses: mlugg/setup-zig@v2 if: ${{ matrix.platform.manylinux }} @@ -185,48 +150,6 @@ jobs: echo "COMPATIBILITY_FLAG=$COMPATIBILITY_FLAG" >> "$GITHUB_OUTPUT" echo "WITH_ZIG_FLAG=$WITH_ZIG_FLAG" >> "$GITHUB_OUTPUT" - - name: Check tket-c-api shared library - shell: bash - run: | - echo "tket-c-api files:" - find $TKET_C_API_PATH -type f - find $TKET_C_API_PATH -type f -name "*.so" | while IFS= read -r sofile; do - echo "======= objdump -f $sofile =======" - objdump -f "$sofile" || echo "objdump failed for $sofile" - echo "======= readelf -h $sofile =======" - readelf -h "$sofile" 2>/dev/null | head -20 || echo "readelf failed for $sofile" - echo "======= file $sofile =======" - file "$sofile" || echo "file failed for $sofile" - echo - done - find $TKET_C_API_PATH -type f -name "*.dylib" | while IFS= read -r dylibfile; do - echo "======= otool -L $dylibfile =======" - otool -L "$dylibfile" || echo "otool failed for $dylibfile" - echo "======= file $dylibfile =======" - file "$dylibfile" || echo "file failed for $dylibfile" - echo - done - find $TKET_C_API_PATH -type f -name "*.lib" | while IFS= read -r libfile; do - echo "======= Checking Windows library: $libfile =======" - echo "======= file $libfile =======" - file "$libfile" || echo "file failed for $libfile" - echo - done - - - name: Copy DLL to package directory (Windows) - if: runner.os == 'Windows' - shell: bash - run: | - # Copy the DLL to the package directory so maturin can include it in the wheel - if [ -f "$TKET_C_API_PATH/bin/tket-c-api.dll" ]; then - cp "$TKET_C_API_PATH/bin/tket-c-api.dll" "$MODULE_DIR/tket/tket-c-api.dll" - echo "Copied DLL to $MODULE_DIR/tket/tket-c-api.dll" - ls -lh "$MODULE_DIR/tket/tket-c-api.dll" - else - echo "ERROR: DLL not found at $TKET_C_API_PATH/bin/tket-c-api.dll" - exit 1 - fi - - name: Build wheels shell: bash run: | @@ -285,9 +208,6 @@ jobs: run: | echo "Testing the newly built ${{ matrix.platform.target }} wheels..." if [ "$TEST_INSTALL" = "true" ]; then - # Make sure we only use the tket lib from the wheel itself - rm -rf $WORKSPACE\tket-c-api\lib - rm -rf $WORKSPACE\tket-c-api\bin uv run -f dist --with tket --refresh-package tket --no-project -- python -c "import tket" fi uvx twine check --strict dist/* diff --git a/.github/workflows/release-checks.yml b/.github/workflows/release-checks.yml index ddeebf5a2..e27b21b93 100644 --- a/.github/workflows/release-checks.yml +++ b/.github/workflows/release-checks.yml @@ -17,13 +17,6 @@ env: # Pinned version for the uv package manager UV_VERSION: "0.9.7" - # Path to the cached tket-c-api library - # When this envvar is set, the `./.github/actions/tket-c-api` action **must** be run to fetch the artifacts - # This config is not required, but speeds up the build by caching the tket-c-api library - # The alternative is to install conan and remove the env var - TKET_C_API_PATH: "${{ github.workspace }}/tket-c-api" - LD_LIBRARY_PATH: ${{ github.workspace }}/tket-c-api/lib - jobs: py-release: name: Check `tket-py`compatibility with ${{ matrix.target.resolution }} dependencies @@ -43,10 +36,10 @@ jobs: steps: - uses: actions/checkout@v6 - uses: mozilla-actions/sccache-action@v0.0.9 - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ env.TKET_C_API_PATH }} + cache_packages: true - name: Set up uv uses: astral-sh/setup-uv@v7 with: diff --git a/.github/workflows/semver-checks.yml b/.github/workflows/semver-checks.yml index 2ceaa74a8..67df71a00 100644 --- a/.github/workflows/semver-checks.yml +++ b/.github/workflows/semver-checks.yml @@ -24,29 +24,17 @@ jobs: needs: [changes] if: ${{ needs.changes.outputs.rust == 'true' }} runs-on: ubuntu-latest - env: - # Path to the cached tket-c-api library - # When this envvar is set, the `./.github/actions/tket-c-api` action **must** be run to fetch the artifacts - # This config is not required, but speeds up the build by caching the tket-c-api library - # The alternative is to install conan and remove the env var - TKET_C_API_PATH: ${{ github.workspace }}/tket-c-api - LD_LIBRARY_PATH: ${{ github.workspace }}/tket-c-api/lib steps: - name: Checkout tket uses: actions/checkout@v6 - # NOTE: here we are using tket-c-api configuration (version and conanfile.txt) from main - # to determine the APIs of both main and the PR branch before we look for breaking changes. - # This may give incorrect results / CI errors if the PR changes that configuration. - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ env.TKET_C_API_PATH }} + cache_packages: true - name: Install LLVM from apt run: | echo "Installing apt dependencies: llvm-14" sudo apt-get install -y llvm-14 - uses: quantinuum/hugrverse-actions/rs-semver-checks@main - env: - TKET_C_API_PATH: ${{ env.TKET_C_API_PATH }} with: token: ${{ secrets.HUGRBOT_PAT }} diff --git a/.github/workflows/unsoundness.yml b/.github/workflows/unsoundness.yml index 6822b31ab..081d9ff04 100644 --- a/.github/workflows/unsoundness.yml +++ b/.github/workflows/unsoundness.yml @@ -26,13 +26,6 @@ env: LLVM_VERSION: "14.0" LLVM_FEATURE_NAME: "14-0" - # Path to the cached tket-c-api library - # When this envvar is set, the `./.github/actions/tket-c-api` action **must** be run to fetch the artifacts - # This config is not required, but speeds up the build by caching the tket-c-api library - # The alternative is to install conan and remove the env var - TKET_C_API_PATH: "${{ github.workspace }}/tket-c-api" - LD_LIBRARY_PATH: ${{ github.workspace }}/tket-c-api/lib - jobs: miri: name: "Miri" @@ -49,10 +42,10 @@ jobs: uses: KyleMayes/install-llvm-action@v2 with: version: ${{ env.LLVM_VERSION }} - - name: Install tket-c-api library - uses: ./.github/actions/tket-c-api + - name: Install conan + uses: conan-io/setup-conan@v1 with: - install-path: ${{ env.TKET_C_API_PATH }} + cache_packages: true - name: Test with Miri run: cargo miri test diff --git a/tket1-passes/conanfile.txt b/tket1-passes/conanfile.txt index 01871ccce..33e13d2db 100644 --- a/tket1-passes/conanfile.txt +++ b/tket1-passes/conanfile.txt @@ -1,2 +1,2 @@ [requires] -tket-c-api/2.1.67@tket/stable +tket-c-api/2.1.72@tket/stable