Skip to content

Commit

Permalink
ci: revert and use specific build for musllinux for now
Browse files Browse the repository at this point in the history
  • Loading branch information
moabu committed Dec 10, 2024
1 parent fca623c commit f7edf7e
Showing 1 changed file with 43 additions and 61 deletions.
104 changes: 43 additions & 61 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,65 +381,47 @@ jobs:
echo "${{ secrets.MOAUTO_WORKFLOW_TOKEN }}" | gh auth login --with-token
gh release upload "${VERSION}" *.whl *.sha256sum *.asc
build_cedarling_python_musl:
if: github.repository == 'JanssenProject/jans'
runs-on: ubuntu-latest
strategy:
matrix:
platform: [
{ target: "x86_64-unknown-linux-musl", image_tag: "x86_64-musl" },
{ target: "i686-unknown-linux-musl", image_tag: "i686-musl" },
{ target: "aarch64-unknown-linux-musl", image_tag: "aarch64-musl" },
{ target: "armv7-unknown-linux-musleabihf", image_tag: "armv7-musleabihf" },
{ target: "powerpc64le-unknown-linux-musl", image_tag: "powerpc64le-musl" },
]
container:
image: docker://messense/rust-musl-cross:${{ matrix.platform.image_tag }}
env:
CFLAGS_armv7_unknown_linux_musleabihf: '-mfpu=vfpv3-d16'
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Import GPG key
id: import_gpg
continue-on-error: true
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
with:
gpg_private_key: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- uses: actions/setup-python@v5
- name: install pkg-config
run: |
sudo apt-get update
sudo apt -y install pkg-config libssl-dev
sudo apt-get -y install libudev-dev
apt-file list libssl-dev
- name: Build Wheels - musllinux
uses: PyO3/maturin-action@v1
env:
OPENSSL_INCLUDE_DIR: /usr/include/ssl
with:
working-directory: ${{ github.workspace }}/jans-cedarling/bindings/cedarling_python
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_1
container: off
args: --release -o dist -i python3.10 python3.11
if: github.repository == 'JanssenProject/jans'
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit

- name: Generate sha256sum and sign
id: sign-cedarling
run: |
TAG=$(echo ${{ github.event.ref }} | cut -d '/' -f 3)
VERSION="${TAG}"
if [ "${TAG}" == "nightly" ]; then
VERSION=nightly
TAG="0.0.0"
fi
cd ${{ github.workspace }}/jans-cedarling/target/wheels
ls
echo "${{ secrets.MOAUTO_WORKFLOW_TOKEN }}" | gh auth login --with-token
gh release upload "${VERSION}" *.whl
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Import GPG key
id: import_gpg
continue-on-error: true
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
with:
gpg_private_key: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.MOAUTO_GPG_PRIVATE_KEY_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true

- uses: actions/setup-python@v5
- uses: PyO3/maturin-action@v1
with:
working-directory: ${{ github.workspace }}/jans-cedarling/bindings/cedarling_python
manylinux: musllinux_1_2
command: build
args: --release -i python3.10 python3.11

- name: Generate sha256sum and sign
id: sign-cedarling
run: |
TAG=$(echo ${{ github.event.ref }} | cut -d '/' -f 3)
VERSION="${TAG}"
if [ "${TAG}" == "nightly" ]; then
VERSION=nightly
TAG="0.0.0"
fi
cd ${{ github.workspace }}/jans-cedarling/target/wheels
sha256sum cedarling_python-"${TAG}"-cp311-cp311-musllinux_1_2_x86_64.whl > cedarling_python-"${TAG}"-cp311-cp311-musllinux_1_2_x86_64.whl.sha256sum
sha256sum cedarling_python-"${TAG}"-cp310-cp310-musllinux_1_2_x86_64.whl > cedarling_python-"${TAG}"-cp310-cp310-musllinux_1_2_x86_64.whl.sha256sum
gpg --armor --detach-sign cedarling_python-"${TAG}"-cp311-cp311-musllinux_1_2_x86_64.whl || echo "Failed to sign"
gpg --armor --detach-sign cedarling_python-"${TAG}"-cp310-cp310-musllinux_1_2_x86_64.whl || echo "Failed to sign"
echo "${{ secrets.MOAUTO_WORKFLOW_TOKEN }}" | gh auth login --with-token
gh release upload "${VERSION}" *.whl *.sha256sum *.asc

0 comments on commit f7edf7e

Please sign in to comment.