From 4e80afd24467db9c3a84639ae56c02449bd5100b Mon Sep 17 00:00:00 2001 From: bobxli Date: Sat, 24 Dec 2022 12:55:33 +0800 Subject: [PATCH] fix: update help msg after rm llvm deps --- .github/workflows/brew_release.yml | 4 +-- .github/workflows/release.yml | 18 ++------------ book/book.yaml | 12 +++++++++ deb/DEBIAN/postinst | 15 +++++------ deb/apt.yaml | 40 ------------------------------ 5 files changed, 22 insertions(+), 67 deletions(-) diff --git a/.github/workflows/brew_release.yml b/.github/workflows/brew_release.yml index 518b04dd9..ee04dce78 100644 --- a/.github/workflows/brew_release.yml +++ b/.github/workflows/brew_release.yml @@ -33,8 +33,8 @@ jobs: # Custom dependencies in case other formulas are needed to build the current one. # Optional - multiline string. - depends_on: | - "llvm@14" + # depends_on: | + # "llvm@14" # Custom install command for your formula. # Required - string. install: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0867b1f9a..3854463f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,19 +50,8 @@ jobs: target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Cache LLVM and Clang - id: cache-llvm - uses: actions/cache@v2 - with: - path: ${{ runner.temp }}/llvm - key: llvm-14 - - name: Install LLVM and Clang - if: ${{ matrix.config.os != 'windows-latest' }} - uses: KyleMayes/install-llvm-action@v1 - with: - version: "14" - directory: ${{ runner.temp }}/llvm - cached: ${{ steps.cache-llvm.outputs.cache-hit }} + - name: Install LLVM + uses: Pivot-Studio/setup-llvm@main - name: set up win scoop if: ${{ matrix.config.os == 'windows-latest' }} @@ -91,21 +80,18 @@ jobs: if: ${{ matrix.config.os == 'windows-latest' }} env: RUSTFLAGS: ${{ matrix.config.RUSTFLAGS }} - LLVM_SYS_140_PREFIX: ${{ runner.temp }}\llvm run: cargo build --release --verbose - name: Cargo build if: ${{ matrix.config.os != 'windows-latest' }} env: RUSTFLAGS: ${{ matrix.config.RUSTFLAGS }} - LLVM_SYS_140_PREFIX: ${{ runner.temp }}/llvm run: cargo build --release - name: Cargo build vm if: ${{ matrix.config.os != 'windows-latest' }} env: RUSTFLAGS: ${{ matrix.config.RUSTFLAGS }} - LLVM_SYS_140_PREFIX: ${{ runner.temp }}/llvm run: cd vm && cargo build --release - run: mkdir -p ${{ matrix.config.dir }} diff --git a/book/book.yaml b/book/book.yaml index 3c8ae7711..c8f899902 100644 --- a/book/book.yaml +++ b/book/book.yaml @@ -86,8 +86,20 @@ spec: name: lang-docs port: number: 8110 + - host: apt.lang.pivotstudio.cn + http: + paths: + # 不同path转发到不同端口 + - path: / + pathType: Prefix + backend: + service: + name: apt-repo + port: + number: 8110 tls: - secretName: pivot-tls-cert hosts: - lang.pivotstudio.cn + - apt.lang.pivotstudio.cn diff --git a/deb/DEBIAN/postinst b/deb/DEBIAN/postinst index 91db78812..414739344 100644 --- a/deb/DEBIAN/postinst +++ b/deb/DEBIAN/postinst @@ -3,18 +3,15 @@ NC='\033[0m' RED='\033[0;31m' if [ "$1" = configure ]; then - if [[ -z "${KAGARI_LIB_ROOT}" ]]; then - echo "export KAGARI_LIB_ROOT=/pl/planglib" >> ~/.bashrc - echo "export PL_ROOT=/pl" >> ~/.bashrc - fi echo "${GREEN}" echo "-------------------------------------------------------------------" - echo "Successfully installed pivot-lang compiler with JIT feature!" + echo "Successfully installed pivot-lang compiler!" echo "the pivot-lang compiler is now available as 'plc' command" - echo "${RED}**jit feature does not support debug**" - echo "you may need to restart your shell to load environment variables" - echo "to install aot feature, please install clang-14 manually" - echo "see https://apt.llvm.org/ for more details" + echo "${RED}在开始使用plc之前,您需要设定两个环境变量" + echo "请使用以下命令在当前终端中配置环境变量:" + echo " $ export KAGARI_LIB_ROOT=/pl/planglib" + echo " $ export PL_ROOT=/pl" + echo "如果您希望以后新创建的终端能直接使用plc,请将以上两行命令添加到~/.bashrc文件中" echo "-------------------------------------------------------------------" echo "${NC}" fi \ No newline at end of file diff --git a/deb/apt.yaml b/deb/apt.yaml index 2b33c6200..75cbbcefb 100644 --- a/deb/apt.yaml +++ b/deb/apt.yaml @@ -50,44 +50,4 @@ spec: memory: 50Mi restartPolicy: Always status: {} ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: apt-repo - namespace: lang - annotations: - kubernetes.io/ingress.class: "nginx" - # 开启use-regex,启用path的正则匹配 - nginx.ingress.kubernetes.io/use-regex: "true" - kubernetes.io/tls-acme: "true" - cert-manager.io/cluster-issuer: "letsencrypt-prod" - # ratelimit - nginx.ingress.kubernetes.io/limit-connections: "60" - nginx.ingress.kubernetes.io/limit-rps: "60" - nginx.ingress.kubernetes.io/force-ssl-redirect: "true" - nginx.ingress.kubernetes.io/backend-protocol: HTTP - nginx.ingress.kubernetes.io/configuration-snippet: | - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto https; - proxy_ssl_server_name on; - proxy_ssl_name $host; -spec: - rules: - - host: apt.lang.pivotstudio.cn - http: - paths: - # 不同path转发到不同端口 - - path: / - pathType: Prefix - backend: - service: - name: apt-repo - port: - number: 8110 - tls: - - secretName: pivot-tls-cert - hosts: - - apt.lang.pivotstudio.cn