diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 3372ffb5..9c82f949 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -17,6 +17,9 @@ jobs: sqlx: uses: ./.github/workflows/sqlx.yml + + build-pyauditor-source: + uses: ./.github/workflows/build_pyauditor_source.yml build-pyauditor-linux: strategy: @@ -65,7 +68,7 @@ jobs: release-pyauditor: if: "startsWith(github.ref, 'refs/tags/')" - needs: [build-pyauditor-linux, build-pyauditor-windows, build-pyauditor-macos, prepare-input-parameters] + needs: [build-pyauditor-source, build-pyauditor-linux, build-pyauditor-windows, build-pyauditor-macos, prepare-input-parameters] uses: ./.github/workflows/release_pyauditor.yml with: python-version: ${{ needs.prepare-input-parameters.outputs.python_version }} diff --git a/.github/workflows/build_pyauditor_linux.yml b/.github/workflows/build_pyauditor_linux.yml index 2f4f7286..a6f261cd 100644 --- a/.github/workflows/build_pyauditor_linux.yml +++ b/.github/workflows/build_pyauditor_linux.yml @@ -34,7 +34,7 @@ jobs: target: x86_64 manylinux: auto command: build - args: --release --sdist -o dist --interpreter python${{ inputs.python-version }} --manifest-path pyauditor/Cargo.toml + args: --release -o dist --interpreter python${{ inputs.python-version }} --manifest-path pyauditor/Cargo.toml - name: Upload wheel uses: actions/upload-artifact@v4 diff --git a/.github/workflows/build_pyauditor_source.yml b/.github/workflows/build_pyauditor_source.yml new file mode 100644 index 00000000..04552a69 --- /dev/null +++ b/.github/workflows/build_pyauditor_source.yml @@ -0,0 +1,39 @@ +name: build-pyauditor-source + +on: + workflow_call: + +jobs: + build-pyauditor: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Cache dependencies + uses: Swatinem/rust-cache@v2 + with: + shared-key: cache-dependencies-pyauditor + + # We need to somehow get the SQLX_OFFLINE env variable into the container. + # Since `maturin-action` doesn't enable us to do that, we have to tell cargo + # via its configuration. + - name: Create fake .cargo/config.toml + run: | + mkdir -p .cargo + echo -e "[env]\nSQLX_OFFLINE = \"true\"" >> .cargo/config.toml + + - name: Maturin + uses: messense/maturin-action@v1 + with: + maturin-version: v1.2.3 + target: x86_64 + manylinux: auto + command: build + args: --release --sdist -o dist --interpreter --manifest-path pyauditor/Cargo.toml + + - name: Upload sdist wheel + uses: actions/upload-artifact@v4 + with: + path: dist/*.gz + name: pyauditor-wheels-source diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f774424..eb040e34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,6 +68,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Dependencies: Update wiremock from 0.5.21 to 0.5.22 ([@QuantumDancer](https://github.com/QuantumDancer)) - CI: Replace unmaintained actions-rs/audit-check action with maintained one from rustsec ([@QuantumDancer](https://github.com/QuantumDancer)) - CI: Introduce dependency between pyauditor release and release of python packages ([@dirksammel](https://github.com/dirksammel)) +- CI: Add extra workflow for building the pyaudtitor source distribution ([@dirksammel](https://github.com/dirksammel)) - Apel plugin: Replace all URL encodings in meta fields with single-character equivalent ([@dirksammel](https://github.com/dirksammel)) - Apel plugin: Use advanced querying for filtering records ([@dirksammel](https://github.com/dirksammel)) - Apel plugin: Rename summary record field `Infrastructure` to `InfrastructureType` ([@dirksammel](https://github.com/dirksammel))