-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into readme-git-command
- Loading branch information
Showing
777 changed files
with
72,054 additions
and
16,008 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Pnpm Lockfile Check | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
check-lockfile: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 23.3.0 | ||
|
||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 9.15.0 | ||
|
||
- name: Check if lockfile is up-to-date | ||
id: lockfile-check | ||
run: | | ||
# Try to install with frozen lockfile | ||
if ! pnpm install --frozen-lockfile; then | ||
echo "::error::Lockfile is out of date. Please run 'pnpm install --no-frozen-lockfile' and commit the updated pnpm-lock.yaml" | ||
echo "failed=true" >> $GITHUB_OUTPUT | ||
exit 1 | ||
fi | ||
- name: Comment on PR | ||
if: failure() && steps.lockfile-check.outputs.failed == 'true' | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: '❌ The pnpm-lockfile is out of date. Please run `pnpm install --no-frozen-lockfile` and commit the updated pnpm-lock.yaml file.' | ||
}) |
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
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,59 @@ | ||
# Copyright (C) 2024 Gramine contributors | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
THIS_DIR := $(dir $(lastword $(MAKEFILE_LIST))) | ||
NODEJS_DIR ?= /usr/bin | ||
|
||
ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine) | ||
|
||
ifeq ($(DEBUG),1) | ||
GRAMINE_LOG_LEVEL = debug | ||
else | ||
GRAMINE_LOG_LEVEL = error | ||
endif | ||
|
||
.PHONY: all | ||
all: eliza.manifest | ||
ifeq ($(SGX),1) | ||
all: eliza.manifest.sgx eliza.sig | ||
endif | ||
|
||
.PHONY: eliza.manifest | ||
eliza.manifest: eliza.manifest.template | ||
gramine-manifest \ | ||
-Dlog_level=$(GRAMINE_LOG_LEVEL) \ | ||
-Darch_libdir=$(ARCH_LIBDIR) \ | ||
-Dnodejs_dir=$(NODEJS_DIR) \ | ||
$< >$@ | ||
|
||
# Make on Ubuntu <= 20.04 doesn't support "Rules with Grouped Targets" (`&:`), | ||
# for details on this workaround see | ||
# https://github.com/gramineproject/gramine/blob/e8735ea06c/CI-Examples/helloworld/Makefile | ||
eliza.manifest.sgx eliza.sig: sgx_sign | ||
@: | ||
|
||
.INTERMEDIATE: sgx_sign | ||
sgx_sign: eliza.manifest | ||
gramine-sgx-sign \ | ||
--manifest $< \ | ||
--output $<.sgx | ||
|
||
ifeq ($(SGX),) | ||
GRAMINE = gramine-direct | ||
else | ||
GRAMINE = gramine-sgx | ||
endif | ||
|
||
# Start the default character: | ||
# SGX=1 make start | ||
# Start a specific character by passing arguments: | ||
# SGX=1 make start -- --character "character/your_character_file.json" | ||
.PHONY: start | ||
start: all | ||
$(GRAMINE) ./eliza --loader ts-node/esm src/index.ts --isRoot $(filter-out $@,$(MAKECMDGOALS)) | ||
.PHONY: clean | ||
clean: | ||
$(RM) *.manifest *.manifest.sgx *.sig | ||
|
||
.PHONY: distclean | ||
distclean: clean |
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
Oops, something went wrong.