tweaking maturin install
This commit is contained in:
parent
37f4d8f84c
commit
29e120c9ee
@ -30,47 +30,26 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
|
|
||||||
publishRustLib:
|
buildPy:
|
||||||
|
name: Build Python
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Publish Rust Library
|
|
||||||
needs: [ build ] # for ignoring bad builds
|
needs: [ build ] # for ignoring bad builds
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@v4 # get source
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
with:
|
||||||
github-server-url: https://gitea.sheep-ghoul.ts.net
|
github-server-url: https://gitea.sheep-ghoul.ts.net
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Python 3
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
python-version: ${{ env.python-version }}
|
||||||
|
|
||||||
- name: Add SarGit Repo
|
- name: Install Maturin
|
||||||
run: |
|
run: sudo apt update && sudo apt install -y python-maturin
|
||||||
cat <<EOF > ~/.cargo/config.toml
|
|
||||||
[registry]
|
|
||||||
default = "sargit"
|
|
||||||
|
|
||||||
[registries.sargit]
|
|
||||||
index = "sparse+https://git.sarsoo.xyz/api/packages/${{ secrets.DOCKERHUB_USERNAME }}/cargo/"
|
|
||||||
|
|
||||||
[net]
|
|
||||||
git-fetch-with-cli = true
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- name: Add SarGit Credentials
|
- name: Build Python
|
||||||
run: |
|
working-directory: ./pyfinlib
|
||||||
cat <<EOF > ~/.cargo/credentials.toml
|
run: maturin develop
|
||||||
[registries.sargit]
|
|
||||||
token = "Bearer ${{ secrets.DOCKERHUB_TOKEN }}"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- name: Cargo Publish
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: publish
|
|
||||||
args: --package finlib
|
|
||||||
|
|
||||||
buildWASM:
|
buildWASM:
|
||||||
name: Build WASM
|
name: Build WASM
|
||||||
@ -94,27 +73,6 @@ jobs:
|
|||||||
working-directory: ./finlib-wasm
|
working-directory: ./finlib-wasm
|
||||||
run: wasm-pack build
|
run: wasm-pack build
|
||||||
|
|
||||||
buildPy:
|
|
||||||
name: Build Python
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [ build ] # for ignoring bad builds
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4 # get source
|
|
||||||
with:
|
|
||||||
github-server-url: https://gitea.sheep-ghoul.ts.net
|
|
||||||
|
|
||||||
- name: Install Python 3
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: ${{ env.python-version }}
|
|
||||||
|
|
||||||
- name: Install Maturin
|
|
||||||
run: pip3 install maturin
|
|
||||||
|
|
||||||
- name: Build Python
|
|
||||||
working-directory: ./pyfinlib
|
|
||||||
run: maturin develop
|
|
||||||
|
|
||||||
publishNPM:
|
publishNPM:
|
||||||
name: Publish NPM
|
name: Publish NPM
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -152,4 +110,46 @@ jobs:
|
|||||||
working-directory: ./finlib-wasm/pkg
|
working-directory: ./finlib-wasm/pkg
|
||||||
run: npm publish
|
run: npm publish
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
publishRustLib:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Publish Rust Library
|
||||||
|
needs: [ build ] # for ignoring bad builds
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
github-server-url: https://gitea.sheep-ghoul.ts.net
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: Add SarGit Repo
|
||||||
|
run: |
|
||||||
|
cat <<EOF > ~/.cargo/config.toml
|
||||||
|
[registry]
|
||||||
|
default = "sargit"
|
||||||
|
|
||||||
|
[registries.sargit]
|
||||||
|
index = "sparse+https://git.sarsoo.xyz/api/packages/${{ secrets.DOCKERHUB_USERNAME }}/cargo/"
|
||||||
|
|
||||||
|
[net]
|
||||||
|
git-fetch-with-cli = true
|
||||||
|
EOF
|
||||||
|
|
||||||
|
- name: Add SarGit Credentials
|
||||||
|
run: |
|
||||||
|
cat <<EOF > ~/.cargo/credentials.toml
|
||||||
|
[registries.sargit]
|
||||||
|
token = "Bearer ${{ secrets.DOCKERHUB_TOKEN }}"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
- name: Cargo Publish
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: publish
|
||||||
|
args: --package finlib
|
Loading…
x
Reference in New Issue
Block a user