Skip to content

Commit

Permalink
refactor(ci): use ghjk for deps (#495)
Browse files Browse the repository at this point in the history
### Describe your change


This PR merges most of the CI test runs into one and make use of the
`ghjk` tool to install most of the dependencies.

### Motivation and context

Improve tool dependency management.

### Migration notes

### Checklist

- [ ] The change come with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change

---------

Co-authored-by: Natoandro <[email protected]>
  • Loading branch information
Yohe-Am and Natoandro authored Dec 18, 2023
1 parent e193ea1 commit a7aac5b
Show file tree
Hide file tree
Showing 8 changed files with 894 additions and 437 deletions.
25 changes: 5 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@ on:
- v*

env:
GHJK_VERSION: "6040bb3"
PYTHON_VERSION: "3.8"
POETRY_VERSION: "1.7.0"
DENO_VERSION: "1.38.5"
DENO_VERSION: "1.39.0"
REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/typegate
WASM_TOOLS_VERSION: "1.0.45"
JCO_VERSION: "0.12.1"
WASMEDGE_VERSION: "0.13.5"
WASM_OPT_VERSION: "0.116.0"
PNPM_VERSION: "8.8.0"

jobs:
check-bump:
Expand Down Expand Up @@ -99,33 +94,23 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- uses: rui314/setup-mold@v1
- uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ runner.os }}-rust-${{ hashFiles('**/rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}
- uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ env.POETRY_VERSION }}
- uses: pnpm/[email protected]
with:
version: ${{ env.PNPM_VERSION }}
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "poetry"
- env:
- uses: metatypedev/setup-ghjk@v1
- shell: bash
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
WASM_FILE: target/release/typegraph_core.wasm
run: |
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v $WASMEDGE_VERSION
export LD_LIBRARY_PATH="$HOME/.wasmedge/lib:$LD_LIBRARY_PATH"
cargo install wasm-tools --version $WASM_TOOLS_VERSION --locked
cargo install wasm-opt --version $WASM_OPT_VERSION --locked
cargo build -p typegraph_core --target wasm32-unknown-unknown --target-dir target/wasm --release
mkdir -p $(dirname $WASM_FILE)
wasm-opt -Oz target/wasm/wasm32-unknown-unknown/release/typegraph_core.wasm -o $WASM_FILE.opt
Expand Down
Loading

0 comments on commit a7aac5b

Please sign in to comment.