Skip to content

Commit

Permalink
Merge branch 'main' into test-runner
Browse files Browse the repository at this point in the history
# Conflicts:
#	Cargo.lock
#	dev/deps.ts
#	dev/test.ts
  • Loading branch information
Natoandro committed Jul 4, 2024
2 parents 6382763 + 2606f8e commit c22928a
Show file tree
Hide file tree
Showing 946 changed files with 71,820 additions and 55,357 deletions.
725 changes: 603 additions & 122 deletions .ghjk/deno.lock

Large diffs are not rendered by default.

3,824 changes: 2,639 additions & 1,185 deletions .ghjk/lock.json

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions .git-branches.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
push-hook = true
push-new-branches = false
ship-delete-tracking-branch = false
sync-before-ship = true
sync-upstream = true

[branches]
main = "main"
perennials = []
perennial-regex = ""

[hosting]
# platform = ""
# origin-hostname = ""

[sync-strategy]

feature-branches = "rebase"
perennial-branches = "rebase"
20 changes: 11 additions & 9 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
<!--
Pull requests are squash merged using:
Pull requests are squashed and merged using:
- their title as the commit message
- their description as the commit body
Having a good title and description is important for the users to get readable changelog and understand when they need to update his code and how.
Having a good title and description is important for the users to get readable changelog.
-->

<!-- Explain WHAT the change is -->
<!-- 1. Explain WHAT the change is about -->

#### Motivation and context
-

<!-- Explain WHY the was made or link an issue number -->
<!-- 2. Explain WHY the change cannot be made simpler -->

#### Migration notes
-

<!-- 3. Explain HOW users should update their code -->

<!-- Explain HOW users should update their code when required -->
#### Migration notes

### Checklist
...

- [ ] The change come with new or modified tests
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
119 changes: 119 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
on:
merge_group:
types:
- checks_requested

env:
GHJK_VERSION: "0.2.0"
DENO_VERSION: "1.43.6"
RUST_BACKTRACE: "full"
RUST_LOG: "info,swc_ecma_codegen=off,tracing::span=off"
DENO_DIR: deno-dir

jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
website:
- '.github/workflows/tests.yml'
- 'website/**'
meta-cli:
- '.github/workflows/tests.yml'
- 'libs/**'
- 'meta-cli/**'
- 'Cargo.lock'
typegate:
- '.github/workflows/tests.yml'
- 'libs/**'
- 'typegate/**'
- 'meta-cli/**'
- 'Cargo.lock'
full:
- '.github/workflows/tests.yml'
- 'libs/**'
- 'typegate/**'
- 'typegraph/**'
- 'meta-cli/**'
- 'Cargo.lock'
- 'examples/**'
rust:
- '.github/workflows/tests.yml'
- 'libs/**'
- 'Cargo.lock'
outputs:
website: ${{ steps.filter.outputs.website }}
meta-cli: ${{ steps.filter.outputs.meta-cli }}
typegate: ${{ steps.filter.outputs.typegate }}
full: ${{ steps.filter.outputs.full }}
rust: ${{ steps.filter.outputs.rust }}


test-meta-cli-compat:
needs: changes
if: ${{ needs.changes.outputs.meta-cli == 'true' }}
runs-on: "${{ matrix.os }}"
strategy:
matrix:
include:
- os: macos-13
activate: "source .venv/bin/activate"
- os: macos-14
activate: "source .venv/bin/activate"
#- os: windows-latest
# activate: '.venv\Scripts\activate.bat'
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Cache deno dir
uses: actions/cache@v4
with:
path: ${{ env.DENO_DIR }}
key: deno-mac-${{ hashFiles('**/deno.lock') }}
- uses: dsherret/rust-toolchain-file@v1
- uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ runner.os }}-rust-${{ hashFiles('**/rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}
- name: Cache .venv dir
uses: actions/cache@v4
with:
path: .venv
key: ${{ matrix.os }}-venv-${{ hashFiles('**/poetry.lock', '.ghjk/lock.json') }}
- uses: metatypedev/setup-ghjk@318209a9d215f70716a4ac89dbeb9653a2deb8bc
with:
# temporary fix
cache-key-prefix: ${{ matrix.os }}
- shell: bash
env:
WASM_FILE: target/debug/typegraph_core.wasm
run: |
python3 -m venv .venv
${{ matrix.activate }}
cd typegraph/python
poetry install --no-root
cd ../..
poetry install --no-root
deno cache --import-map typegate/import_map.json typegate/src/main.ts typegate/tests/utils/mod.ts
cargo build -p typegraph_core --target wasm32-unknown-unknown --target-dir target/wasm
mkdir -p $(dirname $WASM_FILE)
wasm-opt -Oz target/wasm/wasm32-unknown-unknown/debug/typegraph_core.wasm -o $WASM_FILE.opt
wasm-tools component new $WASM_FILE.opt -o $WASM_FILE
rm -rf typegraph/python/typegraph/gen
poetry run python -m wasmtime.bindgen $WASM_FILE --out-dir typegraph/python/typegraph/gen
cargo run --locked --package meta-cli -- --help
cargo test --locked --package meta-cli
# check the fat CLI build
cargo run --locked --package meta-cli --features typegate -- --help
8 changes: 6 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
matrix:
include:
- platform: linux/amd64
runner: ubuntu-latest
runner: custom-ubuntu-large
- platform: linux/arm64
runner: custom-macos
runner: custom-arm

steps:
- uses: actions/checkout@v4
Expand All @@ -34,6 +34,8 @@ jobs:
target: dev
cache-from: type=registry,ref=${{ env.REGISTRY_IMAGE }}:base
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
- run: |
mkdir -p digests/dev
digest="${{ steps.dev.outputs.digest }}"
Expand All @@ -46,6 +48,8 @@ jobs:
target: prd
cache-from: type=registry,ref=${{ env.REGISTRY_IMAGE }}:nightly
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
- run: |
mkdir -p digests/prd
digest="${{ steps.prd.outputs.digest }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
- main

env:
GHJK_VERSION: "423d38e"
GHJK_VERSION: "0.2.0"

jobs:
changes:
Expand All @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: metatypedev/setup-ghjk@a7bbf22959e3c0f80b8ba9f800b0a9f1ff17fa7b
- uses: metatypedev/setup-ghjk@318209a9d215f70716a4ac89dbeb9653a2deb8bc
- uses: actions/cache@v4
with:
path: .venv
Expand Down
Loading

0 comments on commit c22928a

Please sign in to comment.