diff --git a/.github/workflows/m1.yml b/.github/workflows/m1.yml new file mode 100644 index 00000000..c4673e74 --- /dev/null +++ b/.github/workflows/m1.yml @@ -0,0 +1,39 @@ +--- +name: Build packages +on: + - pull_request + + +jobs: + # This only uploads the arm64 wheels for Apple M1 Silicon usage + build-macos-arm64: + runs-on: macos-11.0 + name: "build-macos (3.8-3.10, arm64)" + steps: + - uses: actions/checkout@v2 + - name: Start postgresql service + # This skips updating brew when installing a package + env: + HOMEBREW_NO_AUTO_UPDATE: 1 + run: | + brew services start postgresql + + # This builds all possible Python versions (currently, 3.8 to 3.10) + - uses: pypa/cibuildwheel@v2.1.1 + # Read about options here https://cibuildwheel.readthedocs.io/en/stable/options + env: + CIBW_ARCHS: arm64 + # XXX: temp: faster + CIBW_BUILD: cp39-macosx_arm64 + CIBW_REPAIR_WHEEL_COMMAND: "delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}" + # This allows substitution within setup.py + PACKAGE_NAME: psycopg2-binary + + - run: | + ls -l + + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: packages_macos_arm64 + path: ./wheelhouse/*.whl diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index c2f76444..ff3ae21c 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -156,13 +156,9 @@ jobs: # Read about options here https://cibuildwheel.readthedocs.io/en/stable/options env: CIBW_ARCHS: arm64 - CIBW_BUILD: cp39-macosx_arm64 # This allows substitution within setup.py PACKAGE_NAME: psycopg2-binary - - run: | - ls -l wheelhouse - - name: Upload artifacts uses: actions/upload-artifact@v2 with: