From 2331952166bd9224eea114a9bb2ee5de98963afe Mon Sep 17 00:00:00 2001 From: lordlou Date: Fri, 8 Sep 2023 22:21:23 -0400 Subject: [PATCH] Added Maturin github Action --- .github/workflows/build-github-actions.yml | 58 ++++++++++++++++++++++ .github/workflows/learn-github-actions.yml | 13 ----- 2 files changed, 58 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/build-github-actions.yml delete mode 100644 .github/workflows/learn-github-actions.yml diff --git a/.github/workflows/build-github-actions.yml b/.github/workflows/build-github-actions.yml new file mode 100644 index 0000000000..cac3b5e17b --- /dev/null +++ b/.github/workflows/build-github-actions.yml @@ -0,0 +1,58 @@ +name: build-github-actions +on: [push] +jobs: + macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.9 + architecture: x64 + - uses: dtolnay/rust-toolchain@stable + - name: Build wheels - x86_64 + uses: PyO3/maturin-action@v1 + with: + target: x86_64 + args: --release --out dist --sdist -m rust/Cargo.toml + - name: Build wheels - universal2 + uses: PyO3/maturin-action@v1 + with: + target: universal2-apple-darwin + args: --release --out dist -m rust/Cargo.toml + + windows: + runs-on: windows-latest + strategy: + matrix: + target: [x64, x86] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.9 + 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/Cargo.toml + + linux: + runs-on: ubuntu-latest + strategy: + matrix: + target: [x86_64, i686] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.9 + architecture: x64 + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + manylinux: auto + args: --release --out dist -m rust/Cargo.toml \ No newline at end of file diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml deleted file mode 100644 index 6aeba66104..0000000000 --- a/.github/workflows/learn-github-actions.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: learn-github-actions -run-name: ${{ github.actor }} is learning GitHub Actions -on: [push] -jobs: - check-bats-version: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: '14' - - run: npm install -g bats - - run: bats -v \ No newline at end of file