forked from FederatedAI/FATE
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: weiwee <[email protected]>
- Loading branch information
Showing
2 changed files
with
194 additions
and
99 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
name: Build fate_crypto | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
source: | ||
description: "source branch" | ||
required: true | ||
type: | ||
description: "publish type, test or testpypi or pypi" | ||
required: false | ||
default: "test" | ||
|
||
jobs: | ||
macos: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.inputs.source}} | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.6" } } | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.7" } } | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.8" } } | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.9" } } | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.10" } } | ||
- name: Build Wheels - x86_64 | ||
uses: messense/maturin-action@v1 | ||
with: | ||
target: x86_64 | ||
command: build | ||
args: --release -o dist -m rust/fate_crypto/Cargo.toml | ||
- name: Build wheels - universal2 | ||
uses: messense/maturin-action@v1 | ||
with: | ||
command: build | ||
args: --release --no-sdist -o dist --universal2 -m rust/fate_crypto/Cargo.toml | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: dist | ||
windows: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
target: [x64, x86] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.inputs.source}} | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.6" } } | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.7" } } | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.8" } } | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.9" } } | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.10" } } | ||
- name: Build wheels | ||
uses: messense/maturin-action@v1 | ||
with: | ||
command: build | ||
target: ${{ matrix.target }} | ||
args: --release --no-sdist -o dist -m rust/fate_crypto/Cargo.toml | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: dist | ||
linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
target: [x86_64, i686] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.inputs.source}} | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.6" } } | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.7" } } | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.8" } } | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.9" } } | ||
- { uses: actions/setup-python@v2, with: { python-version: "3.10" } } | ||
- name: Build wheels | ||
uses: messense/maturin-action@v1 | ||
with: | ||
command: build | ||
target: ${{ matrix.target }} | ||
manylinux: auto | ||
args: --release --no-sdist -o dist -m rust/fate_crypto/Cargo.toml | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: dist | ||
linux-cross: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [aarch64, armv7, s390x, ppc64le] | ||
python_version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.inputs.source}} | ||
- name: Build Wheels | ||
uses: messense/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
manylinux: auto | ||
command: build | ||
args: --release --no-sdist -o dist -m rust/fate_crypto/Cargo.toml -i ${{ matrix.python_version }} | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: dist | ||
musllinux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- x86_64-unknown-linux-musl | ||
- i686-unknown-linux-musl | ||
python_version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.inputs.source}} | ||
- name: Build wheels | ||
uses: messense/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
manylinux: musllinux_1_2 | ||
args: --release --no-sdist -o dist -m rust/fate_crypto/Cargo.toml -i ${{ matrix.python_version }} | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: dist | ||
musllinux-cross: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- target: aarch64-unknown-linux-musl | ||
arch: aarch64 | ||
- target: armv7-unknown-linux-musleabihf | ||
arch: armv7 | ||
python_version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{github.event.inputs.source}} | ||
- name: Build wheels | ||
uses: messense/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.platform.target }} | ||
manylinux: musllinux_1_2 | ||
args: --release --no-sdist -o dist -m rust/fate_crypto/Cargo.toml -i ${{ matrix.python_version }} | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
needs: [macos, windows, linux, linux-cross, musllinux, musllinux-cross] | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: wheels | ||
path: dist | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6 | ||
- name: Twine check | ||
run: | | ||
pip install -U twine | ||
twine check dist/* | ||
- name: Test Install | ||
run: | | ||
pip install -U pip | ||
pip install --find-link=dist/ fate_crypto | ||
- name: Upload to PyPI Test | ||
if: ${{ github.event.inputs.type == 'testpypi' }} | ||
run: | | ||
twine upload --repository testpypi dist/* --verbose | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.pypitest_token }} | ||
- name: Upload to PyPI | ||
if: ${{ github.event.inputs.type == 'pypi' }} | ||
run: | | ||
twine upload dist/* --verbose | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.pypi_token }} |
This file was deleted.
Oops, something went wrong.