-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI]: Update Iroha 1 branch workflow #185
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,113 @@ | ||||||||||||||||||
name: Iroha 1 branch workflow | ||||||||||||||||||
on: | ||||||||||||||||||
push: | ||||||||||||||||||
branches: | ||||||||||||||||||
- iroha1-main | ||||||||||||||||||
tags: | ||||||||||||||||||
- '*' | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should differentiate between publishing a release and merging into There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. releases should only be built from tags There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The scope of this PR is to fix the branch name and the workflow file name (to avoid confusion), the rest I left as it was There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, but we should split our CI into these workflows:
I think these should all be separate CI files, but maybe you can make them into 2 files (one for merge and one for tags) if the corresponding workflows are the same for |
||||||||||||||||||
pull_request: | ||||||||||||||||||
workflow_dispatch: | ||||||||||||||||||
|
||||||||||||||||||
permissions: | ||||||||||||||||||
contents: read | ||||||||||||||||||
|
||||||||||||||||||
jobs: | ||||||||||||||||||
linux: | ||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||
strategy: | ||||||||||||||||||
matrix: | ||||||||||||||||||
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] | ||||||||||||||||||
steps: | ||||||||||||||||||
- uses: actions/checkout@v3 | ||||||||||||||||||
- uses: actions/setup-python@v4 | ||||||||||||||||||
with: | ||||||||||||||||||
python-version: '3.10' | ||||||||||||||||||
- name: Build wheels | ||||||||||||||||||
uses: PyO3/maturin-action@v1 | ||||||||||||||||||
with: | ||||||||||||||||||
target: ${{ matrix.target }} | ||||||||||||||||||
args: --release --out dist --find-interpreter | ||||||||||||||||||
sccache: 'true' | ||||||||||||||||||
manylinux: auto | ||||||||||||||||||
- name: Upload wheels | ||||||||||||||||||
uses: actions/upload-artifact@v3 | ||||||||||||||||||
with: | ||||||||||||||||||
name: wheels | ||||||||||||||||||
path: dist | ||||||||||||||||||
|
||||||||||||||||||
windows: | ||||||||||||||||||
runs-on: windows-latest | ||||||||||||||||||
strategy: | ||||||||||||||||||
matrix: | ||||||||||||||||||
target: [x64, x86] | ||||||||||||||||||
steps: | ||||||||||||||||||
- uses: actions/checkout@v3 | ||||||||||||||||||
- uses: actions/setup-python@v4 | ||||||||||||||||||
with: | ||||||||||||||||||
python-version: '3.10' | ||||||||||||||||||
architecture: ${{ matrix.target }} | ||||||||||||||||||
- name: Build wheels | ||||||||||||||||||
uses: PyO3/maturin-action@v1 | ||||||||||||||||||
with: | ||||||||||||||||||
target: ${{ matrix.target }} | ||||||||||||||||||
args: --release --out dist --find-interpreter | ||||||||||||||||||
sccache: 'true' | ||||||||||||||||||
- name: Upload wheels | ||||||||||||||||||
uses: actions/upload-artifact@v3 | ||||||||||||||||||
with: | ||||||||||||||||||
name: wheels | ||||||||||||||||||
path: dist | ||||||||||||||||||
|
||||||||||||||||||
macos: | ||||||||||||||||||
runs-on: macos-latest | ||||||||||||||||||
strategy: | ||||||||||||||||||
matrix: | ||||||||||||||||||
target: [x86_64, aarch64] | ||||||||||||||||||
steps: | ||||||||||||||||||
- uses: actions/checkout@v3 | ||||||||||||||||||
- uses: actions/setup-python@v4 | ||||||||||||||||||
with: | ||||||||||||||||||
python-version: '3.10' | ||||||||||||||||||
- name: Build wheels | ||||||||||||||||||
uses: PyO3/maturin-action@v1 | ||||||||||||||||||
with: | ||||||||||||||||||
target: ${{ matrix.target }} | ||||||||||||||||||
args: --release --out dist --find-interpreter | ||||||||||||||||||
sccache: 'true' | ||||||||||||||||||
- name: Upload wheels | ||||||||||||||||||
uses: actions/upload-artifact@v3 | ||||||||||||||||||
with: | ||||||||||||||||||
name: wheels | ||||||||||||||||||
path: dist | ||||||||||||||||||
|
||||||||||||||||||
sdist: | ||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||
steps: | ||||||||||||||||||
- uses: actions/checkout@v3 | ||||||||||||||||||
- name: Build sdist | ||||||||||||||||||
uses: PyO3/maturin-action@v1 | ||||||||||||||||||
with: | ||||||||||||||||||
command: sdist | ||||||||||||||||||
args: --out dist | ||||||||||||||||||
- name: Upload sdist | ||||||||||||||||||
uses: actions/upload-artifact@v3 | ||||||||||||||||||
with: | ||||||||||||||||||
name: wheels | ||||||||||||||||||
path: dist | ||||||||||||||||||
|
||||||||||||||||||
release: | ||||||||||||||||||
name: Release | ||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||
if: "startsWith(github.ref, 'refs/tags/')" | ||||||||||||||||||
needs: [linux, windows, macos, sdist] | ||||||||||||||||||
steps: | ||||||||||||||||||
- uses: actions/download-artifact@v3 | ||||||||||||||||||
with: | ||||||||||||||||||
name: wheels | ||||||||||||||||||
- name: Publish to PyPI | ||||||||||||||||||
uses: PyO3/maturin-action@v1 | ||||||||||||||||||
env: | ||||||||||||||||||
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | ||||||||||||||||||
with: | ||||||||||||||||||
command: upload | ||||||||||||||||||
args: --non-interactive --skip-existing * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you renamed the file, shouldn't you delete the old file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's strange, renaming the file should have deleted the old version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you didn't commit the deleted file