-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Lint * Add build workflow
- Loading branch information
Showing
45 changed files
with
7,084 additions
and
1,919 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,72 @@ | ||
--- | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "0.*" | ||
|
||
jobs: | ||
linux: | ||
runs-on: "ubuntu-latest" | ||
environment: pypi | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: [ "3.9", "3.10", "3.11" ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Create publish script | ||
run: | | ||
cat <<EOF > publish.sh | ||
#!/bin/bash | ||
docker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin \ | ||
build --interpreter ${{ matrix.python-version }} --release --strip | ||
#docker run --rm -v $(pwd):/io -e MATURIN_PYPI_TOKEN="\$1" \ | ||
# ghcr.io/pyo3/maturin publish --interpreter ${{ matrix.python-version }} | ||
EOF | ||
chmod +x publish.sh | ||
- name: Publish optrs | ||
run: | | ||
./publish.sh "${{ secrets.OPT_RS_UPLOAD_TOKEN }}" | ||
- name: Publish optrs-api | ||
run: | | ||
cd api | ||
../publish.sh "${{ secrets.OPT_RS_API_UPLOAD_TOKEN }}" | ||
mac: | ||
runs-on: "macos-latest" | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: [ "3.9", "3.10", "3.11" ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install maturin | ||
run: pip install maturin | ||
|
||
- name: Publish optrs | ||
env: | ||
MATURIN_PYPI_TOKEN: ${{ secrets.OPT_RS_UPLOAD_TOKEN }} | ||
run: | | ||
maturin build --release --strip --universal2 #&& maturin publish | ||
- name: Publish optrs-api | ||
env: | ||
MATURIN_PYPI_TOKEN: ${{ secrets.OPT_RS_API_UPLOAD_TOKEN }} | ||
run: | | ||
cd api | ||
maturin build --release --strip --universal2 #&& maturin publish |
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
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,30 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-toml | ||
|
||
- repo: https://github.com/t-young31/pre-commit-hooks | ||
rev: 0.1.3 | ||
hooks: | ||
- id: stale-version | ||
|
||
- repo: https://github.com/doublify/pre-commit-rust | ||
rev: v1.0 | ||
hooks: | ||
- id: fmt | ||
- id: cargo-check | ||
|
||
- repo: local | ||
hooks: | ||
- id: clippy | ||
name: clippy | ||
description: Lint rust sources | ||
entry: cargo clippy | ||
language: system | ||
args: [ "--", "-A", "warnings"] | ||
types: [ rust ] | ||
pass_filenames: false |
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
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "optrs" | ||
version = "0.1.0" | ||
version = "0.1.1" | ||
edition = "2021" | ||
authors = ["Tom Young"] | ||
|
||
|
Oops, something went wrong.