Skip to content

Commit

Permalink
add extra workflow for building pyauditor source distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
dirksammel committed Feb 5, 2024
1 parent 3f6e423 commit 82f6bf9
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_pyauditor_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/build_pyauditor_source.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 82f6bf9

Please sign in to comment.