From 29e120c9eede1a245a0fe5895c4e3d1650edceb8 Mon Sep 17 00:00:00 2001 From: Andy Pack <andy@sarsoo.xyz> Date: Sat, 15 Feb 2025 20:31:09 +0000 Subject: [PATCH] tweaking maturin install --- .gitea/workflows/build.yml | 108 ++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index ab7e4e1..a827046 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -30,47 +30,26 @@ jobs: with: command: test - publishRustLib: + buildPy: + name: Build Python 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 + - uses: actions/checkout@v4 # get source with: github-server-url: https://gitea.sheep-ghoul.ts.net - - name: Install Rust - uses: actions-rs/toolchain@v1 + - name: Install Python 3 + uses: actions/setup-python@v4 with: - toolchain: stable + python-version: ${{ env.python-version }} - - 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: Install Maturin + run: sudo apt update && sudo apt install -y python-maturin - - 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 + - name: Build Python + working-directory: ./pyfinlib + run: maturin develop buildWASM: name: Build WASM @@ -94,27 +73,6 @@ jobs: working-directory: ./finlib-wasm 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: name: Publish NPM runs-on: ubuntu-latest @@ -152,4 +110,46 @@ jobs: working-directory: ./finlib-wasm/pkg run: npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + 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 \ No newline at end of file