Modify GitHub Actions #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish Wheels | |
on: | |
pull_request: | |
branches: [ main ] | |
env: | |
DOMAIN: poolside | |
REPOSITORY: poolside-dagster | |
WHEEL_DST: /tmp/sp_wheelhouse | |
jobs: | |
build_wheels: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest] | |
runs-on: ${{ matrix.os }} | |
name: Build wheels on ${{ matrix.os }} | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
steps: | |
# - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
# - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::939990436136:role/gh-action-publish-artifacts-role | |
aws-region: us-east-1 | |
- name: Make sure destination dir exists | |
run: | | |
mkdir -p ${{env.WHEEL_DST}} | |
if [ ! -d ${{env.WHEEL_DST}} ]; then | |
echo "wheel dest dir does not exist!" | |
exit 1 | |
fi | |
- name: Install cibuildwheel | |
working-directory: ${{github.workspace}}/python | |
run: | | |
python3 -m pip install --require-hashes --no-dependencies -r ../.github/workflows/requirements/base.txt | |
# python3 -m pip install --require-hashes --no-dependencies -r ../.github/workflows/requirements/cibuildwheel.txt | |
- name: Build for Mac | |
if: runner.os == 'macOS' | |
run: | | |
cmake -B ${{github.workspace}}/build -DSPM_ENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/root | |
cmake --build ${{github.workspace}}/build --config Release --target install --parallel 8 | |
env: | |
CMAKE_OSX_ARCHITECTURES: arm64 | |
- name: Build wheels | |
working-directory: ${{github.workspace}}/python | |
run: python3 -m cibuildwheel --output-dir ${{env.WHEEL_DST}} | |
env: | |
# CIBW_BUILD: cp311-* cp312-* | |
CIBW_BUILD: cp312-* | |
CIBW_ARCHS_LINUX: x86_64 aarch64 | |
CIBW_ARCHS_MACOS: arm64 | |
CIBW_SKIP: "pp* *-musllinux_*" | |
CIBW_BUILD_VERBOSITY: 1 | |
- name: Publish | |
run: | | |
aws codeartifact login --tool twine --domain ${{env.DOMAIN}} --repository ${{ env.REPOSITORY }} | |
twine upload --verbose --repository codeartifact ${{env.WHEEL_DST}}/*.whl |