fix(ci): set -march=armv8-a for aarch64-linux ring cross-compile #10
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: Publish | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - name: Build (all crates) | |
| run: cargo build --workspace --release | |
| - name: Test (all crates) | |
| run: cargo test --workspace | |
| publish-crates: | |
| name: Publish to crates.io | |
| needs: test | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| key: ${{ runner.os }}-cargo-publish-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| # Publish in dependency order — each layer waits for previous to index. | |
| - name: Publish devsper-core | |
| run: cargo publish -p devsper-core --no-verify || true | |
| - run: sleep 20 | |
| - name: Publish devsper-graph | |
| run: cargo publish -p devsper-graph --no-verify || true | |
| - name: Publish devsper-bus | |
| run: cargo publish -p devsper-bus --no-verify || true | |
| - run: sleep 20 | |
| - name: Publish devsper-scheduler | |
| run: cargo publish -p devsper-scheduler --no-verify || true | |
| - name: Publish devsper-executor | |
| run: cargo publish -p devsper-executor --no-verify || true | |
| - name: Publish devsper-plugins | |
| run: cargo publish -p devsper-plugins --no-verify || true | |
| - name: Publish devsper-providers | |
| run: cargo publish -p devsper-providers --no-verify || true | |
| - name: Publish devsper-memory | |
| run: cargo publish -p devsper-memory --no-verify || true | |
| - run: sleep 20 | |
| - name: Publish devsper-compiler | |
| run: cargo publish -p devsper-compiler --no-verify || true | |
| - name: Publish devsper-cluster | |
| run: cargo publish -p devsper-cluster --no-verify || true | |
| - run: sleep 20 | |
| - name: Publish devsper-bin | |
| run: cargo publish -p devsper-bin --no-verify || true | |
| build-wheels: | |
| name: Build wheels (${{ matrix.target }}) | |
| needs: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| - os: ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| - os: macos-latest | |
| target: x86_64-apple-darwin | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set ARM64 cross-compile flags (ring requires __ARM_ARCH) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: echo "CFLAGS_aarch64_unknown_linux_gnu=-march=armv8-a" >> $GITHUB_ENV | |
| - uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist | |
| working-directory: python | |
| manylinux: auto | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-${{ matrix.target }} | |
| path: python/dist/ | |
| publish-pypi: | |
| name: Publish to PyPI | |
| needs: build-wheels | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/devsper/ | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: wheels-* | |
| merge-multiple: true | |
| path: dist/ | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist/ |