trying another fix #41
Workflow file for this run
This file contains hidden or 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-github-actions | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| macos: | |
| runs-on: macos-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| strategy: | |
| matrix: | |
| python: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
| target: ["x86_64", "universal2", "aarch64"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: 'true' | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Build wheels - ${{ matrix.target }} | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist -m rust/maprando/Cargo.toml | |
| - name: Set env | |
| run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| prerelease: true | |
| name: pysmmaprando v${{ env.RELEASE_VERSION }} | |
| files: | | |
| ./dist/*.whl | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| windows: | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| strategy: | |
| matrix: | |
| python: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
| target: [x64] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: 'true' | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| architecture: ${{ matrix.target }} | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist -m rust/maprando/Cargo.toml | |
| - name: Set env | |
| run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| prerelease: true | |
| name: pysmmaprando v${{ env.RELEASE_VERSION }} | |
| files: | | |
| ./dist/*.whl | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| linux: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| strategy: | |
| matrix: | |
| python: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
| target: ["x86_64", "aarch64"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: 'true' | |
| - name: Build x86_64 wheels | |
| uses: PyO3/maturin-action@v1 | |
| if: ${{ matrix.target == 'x86_64' }} | |
| with: | |
| target: ${{ matrix.target }} | |
| manylinux: auto | |
| args: --release --out dist -m rust/maprando/Cargo.toml -i python${{ matrix.python }} | |
| before-script-linux: | | |
| # If we're running on rhel centos, install needed packages. | |
| if command -v yum &> /dev/null; then | |
| yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic | |
| # If we're running on i686 we need to symlink libatomic | |
| # in order to build openssl with -latomic flag. | |
| if [[ ! -d "/usr/lib64" ]]; then | |
| ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so | |
| fi | |
| else | |
| # If we're running on debian-based system. | |
| apt update -y && apt-get install -y libssl-dev openssl pkg-config | |
| fi | |
| - name: Build aarch64 wheels | |
| uses: PyO3/maturin-action@v1 | |
| # One of our deps, "ring", needs a newer sysroot than what "manylinux: auto" provides. | |
| if: ${{ matrix.target == 'aarch64' }} | |
| with: | |
| target: ${{ matrix.target }} | |
| manylinux: 2_28 | |
| args: --release --out dist -m rust/maprando/Cargo.toml -i python${{ matrix.python }} | |
| before-script-linux: | | |
| # If we're running on rhel centos, install needed packages. | |
| if command -v yum &> /dev/null; then | |
| yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic | |
| # If we're running on i686 we need to symlink libatomic | |
| # in order to build openssl with -latomic flag. | |
| if [[ ! -d "/usr/lib64" ]]; then | |
| ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so | |
| fi | |
| else | |
| # If we're running on debian-based system. | |
| apt update -y && apt-get install -y libssl-dev openssl pkg-config | |
| fi | |
| - name: Set env | |
| run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| prerelease: true | |
| name: pysmmaprando v${{ env.RELEASE_VERSION }} | |
| files: | | |
| ./dist/*.whl | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |