From 3b9532bb22baf66a789c24f91ad35ddee99ef4a0 Mon Sep 17 00:00:00 2001 From: John Dumbell Date: Wed, 3 Apr 2024 12:01:48 +0100 Subject: [PATCH] Add x-latest OS deployments --- .github/actions/install-llvm/action.yml | 8 +++-- .github/workflows/deploy-wheels.yml | 39 +++++++------------------ src/rasqal/pyproject.toml | 2 +- 3 files changed, 16 insertions(+), 33 deletions(-) diff --git a/.github/actions/install-llvm/action.yml b/.github/actions/install-llvm/action.yml index 04ac033..36d44e4 100644 --- a/.github/actions/install-llvm/action.yml +++ b/.github/actions/install-llvm/action.yml @@ -29,17 +29,17 @@ runs: - name: Linux - Install build dependencies, ninja run: sudo apt-get install -y ninja-build shell: pwsh - if: ${{ (inputs.os == 'ubuntu-20.04') && (steps.cache-llvm.outputs.cache-hit != 'true') }} + if: ${{ (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-latest') && (steps.cache-llvm.outputs.cache-hit != 'true') }} - name: Windows - Install build dependencies, ninja run: | choco install --accept-license -y ninja choco uninstall -y llvm shell: pwsh - if: ${{ (inputs.os == 'windows-2019') && (steps.cache-llvm.outputs.cache-hit != 'true') }} + if: ${{ (inputs.os == 'windows-2019' || inputs.os == 'windows-latest') && (steps.cache-llvm.outputs.cache-hit != 'true') }} - name: MacOS - Install build dependencies, ccache, ninja run: brew install ccache ninja shell: pwsh - if: ${{ matrix.config.os == 'macos-14' }} + if: ${{ inputs.os == 'macos-14' || inputs.os == 'macos-latest' }} - name: Configure long paths run: git config --global core.longpaths true @@ -52,10 +52,12 @@ runs: Write-Output "LLVM_SYS_${{ inputs.version }}0_PREFIX=${{ inputs.directory }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append Write-Output "RSQL_LLVM_FEATURE_VERSION=llvm${{ inputs.version }}-0" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append shell: pwsh + if: ${{ steps.cache-llvm.outputs.cache-hit != 'true' }} - name: Working dir run: pwd shell: pwsh + if: ${{ steps.cache-llvm.outputs.cache-hit != 'true' }} - name: Install LLVM run: | diff --git a/.github/workflows/deploy-wheels.yml b/.github/workflows/deploy-wheels.yml index e93cf03..5f93a4f 100644 --- a/.github/workflows/deploy-wheels.yml +++ b/.github/workflows/deploy-wheels.yml @@ -6,30 +6,11 @@ on: jobs: deploy: - runs-on: ${{ matrix.config.os }} - env: ${{ matrix.config.env }} + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - config: - - { - os: "ubuntu-20.04", - arch: "amd64", - target: "pypi-build", - env: { }, - } - - { - os: "windows-2019", - arch: "amd64", - target: "pypi-build", - env: { }, - } - - { - os: "macos-14", - arch: "arm64", - target: "pypi-build", - env: { }, - } + os: ["ubuntu-20.04", "windows-2019", "windows-latest", "macos-14", "macos-latest"] steps: - uses: actions/checkout@v4 - name: Setup rust toolchain @@ -41,31 +22,31 @@ jobs: uses: actions/setup-python@v3 with: python-version: 3.9 - if: ${{ matrix.config.os != 'macos-14' }} + if: ${{ matrix.os != 'macos-14' && matrix.os != 'macos-latest' }} - name: Install LLVM uses: ./.github/actions/install-llvm with: version: "14" - os: ${{ matrix.config.os }} + os: ${{ matrix.os }} directory: ${{ github.workspace }}/target/llvm - target: ${{ matrix.config.target }} - - name: "Build ${{ matrix.config.target }}" + target: "pypi-build" + - name: "Run build script" run: | pwd - ./build.ps1 -t ${{ matrix.config.target }} + ./build.ps1 -t "pypi-build" shell: pwsh - name: Artifacts - manylinux uses: actions/upload-artifact@v4 with: name: rasqal-manylinux-artifacts path: src/target/wheels/*manylinux_2_*.whl - if: ${{ matrix.config.os == 'ubuntu-20.04' }} + if: ${{ matrix.os == 'ubuntu-20.04' }} - name: Artifacts uses: actions/upload-artifact@v4 with: - name: rasqal-${{ matrix.config.os }}-artifacts + name: rasqal-${{ matrix.os }}-artifacts path: src/target/wheels/* - if: ${{ matrix.config.os != 'ubuntu-20.04' }} + if: ${{ matrix.os != 'ubuntu-20.04' }} publish: runs-on: ubuntu-latest diff --git a/src/rasqal/pyproject.toml b/src/rasqal/pyproject.toml index b351375..17ec776 100644 --- a/src/rasqal/pyproject.toml +++ b/src/rasqal/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "rasqal" -version = "0.1.2" +version = "0.1.3" requires-python = ">=3.9" description = "A dynamically executed quantum-classical hybrid optimizing runtime." license = { file = "LICENSE" }