зеркало из https://github.com/github/stack-graphs.git
Ensure env variables are available to summary job
This commit is contained in:
Родитель
fcc9a77ac1
Коммит
fa170707d3
|
@ -4,16 +4,20 @@ on:
|
||||||
paths:
|
paths:
|
||||||
- 'stack-graphs/**'
|
- 'stack-graphs/**'
|
||||||
env:
|
env:
|
||||||
|
BASE_REPO: ${{ github.event.pull_request.base.repo.owner.login }}/${{ github.event.pull_request.base.repo.name }}
|
||||||
|
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||||
|
BASE_MASSIF_OUT: base-perf.out
|
||||||
|
BASE_REPORT: base-perf.txt
|
||||||
|
BASE_ARTIFACT: base-perf-results
|
||||||
|
HEAD_REPO: ${{ github.event.pull_request.head.repo.owner.login }}/${{ github.event.pull_request.head.repo.name }}
|
||||||
|
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
|
HEAD_MASSIF_OUT: head-perf.out
|
||||||
|
HEAD_REPORT: head-perf.txt
|
||||||
|
HEAD_ARTIFACT: head-perf-results
|
||||||
TEST_REPO: microsoft/TypeScript
|
TEST_REPO: microsoft/TypeScript
|
||||||
TEST_REF: v4.9.5
|
TEST_REF: v4.9.5
|
||||||
TEST_DIR: test
|
TEST_DIR: test
|
||||||
TEST_SRC: src/compiler
|
TEST_SRC: src/compiler
|
||||||
BASE_MASSIF_OUT: base-perf.out
|
|
||||||
BASE_REPORT: base-perf.txt
|
|
||||||
BASE_ARTIFACT: base-perf-results
|
|
||||||
HEAD_MASSIF_OUT: head-perf.out
|
|
||||||
HEAD_REPORT: head-perf.txt
|
|
||||||
HEAD_ARTIFACT: head-perf-results
|
|
||||||
TSSG_TS: tree-sitter-stack-graphs-typescript
|
TSSG_TS: tree-sitter-stack-graphs-typescript
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -23,8 +27,6 @@ jobs:
|
||||||
base-perf:
|
base-perf:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
BASE_REPO: ${{ github.event.pull_request.base.repo.owner.login }}/${{ github.event.pull_request.base.repo.name }}
|
|
||||||
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
||||||
BASE_DIR: base
|
BASE_DIR: base
|
||||||
steps:
|
steps:
|
||||||
#
|
#
|
||||||
|
@ -45,6 +47,15 @@ jobs:
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y valgrind
|
sudo apt-get install -y valgrind
|
||||||
#
|
#
|
||||||
|
# Checkout code
|
||||||
|
#
|
||||||
|
- name: "Checkout base code"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: ${{ env.BASE_REPO }}
|
||||||
|
ref: ${{ env.BASE_SHA }}
|
||||||
|
path: ${{ env.BASE_DIR }}
|
||||||
|
#
|
||||||
# Cache results
|
# Cache results
|
||||||
#
|
#
|
||||||
- name: "Cache base result"
|
- name: "Cache base result"
|
||||||
|
@ -56,13 +67,6 @@ jobs:
|
||||||
#
|
#
|
||||||
# Build code
|
# Build code
|
||||||
#
|
#
|
||||||
- name: "Checkout base code"
|
|
||||||
if: steps.cache-base-result.outputs.cache-hit != 'true'
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
repository: ${{ env.BASE_REPO }}
|
|
||||||
ref: ${{ env.BASE_SHA }}
|
|
||||||
path: ${{ env.BASE_DIR }}
|
|
||||||
- name: "Build base CLI"
|
- name: "Build base CLI"
|
||||||
if: steps.cache-base-result.outputs.cache-hit != 'true'
|
if: steps.cache-base-result.outputs.cache-hit != 'true'
|
||||||
run: cargo build --package ${{ env.TSSG_TS }} --features cli --release
|
run: cargo build --package ${{ env.TSSG_TS }} --features cli --release
|
||||||
|
@ -104,8 +108,6 @@ jobs:
|
||||||
head-perf:
|
head-perf:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
HEAD_REPO: ${{ github.event.pull_request.head.repo.owner.login }}/${{ github.event.pull_request.head.repo.name }}
|
|
||||||
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
||||||
HEAD_DIR: head
|
HEAD_DIR: head
|
||||||
steps:
|
steps:
|
||||||
#
|
#
|
||||||
|
@ -126,6 +128,15 @@ jobs:
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y valgrind
|
sudo apt-get install -y valgrind
|
||||||
#
|
#
|
||||||
|
# Checkout code
|
||||||
|
#
|
||||||
|
- name: "Checkout head code"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: ${{ env.HEAD_REPO }}
|
||||||
|
ref: ${{ env.HEAD_SHA }}
|
||||||
|
path: ${{ env.HEAD_DIR }}
|
||||||
|
#
|
||||||
# Cache results
|
# Cache results
|
||||||
#
|
#
|
||||||
- name: "Cache head result"
|
- name: "Cache head result"
|
||||||
|
@ -137,13 +148,6 @@ jobs:
|
||||||
#
|
#
|
||||||
# Build code
|
# Build code
|
||||||
#
|
#
|
||||||
- name: "Checkout head code"
|
|
||||||
if: steps.cache-head-result.outputs.cache-hit != 'true'
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
repository: ${{ env.HEAD_REPO }}
|
|
||||||
ref: ${{ env.HEAD_SHA }}
|
|
||||||
path: ${{ env.HEAD_DIR }}
|
|
||||||
- name: "Build head CLI"
|
- name: "Build head CLI"
|
||||||
if: steps.cache-head-result.outputs.cache-hit != 'true'
|
if: steps.cache-head-result.outputs.cache-hit != 'true'
|
||||||
run: cargo build --package ${{ env.TSSG_TS }} --features cli --release
|
run: cargo build --package ${{ env.TSSG_TS }} --features cli --release
|
||||||
|
|
Загрузка…
Ссылка в новой задаче