From bd960d664072124fd3e38b714d21f23e6e26c401 Mon Sep 17 00:00:00 2001 From: Allan Jeremy Date: Thu, 26 May 2022 13:58:39 +0300 Subject: [PATCH] Debug WIP: Reusable workflows --- .github/workflows/benchmark-cachegrind.yml | 27 +++++++++++---------- .github/workflows/benchmark.yml | 27 +++++++++++---------- .github/workflows/setup-luau.yml | 28 ++++++++++++++++++++++ 3 files changed, 58 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/setup-luau.yml diff --git a/.github/workflows/benchmark-cachegrind.yml b/.github/workflows/benchmark-cachegrind.yml index 02dd8a23..21923efe 100644 --- a/.github/workflows/benchmark-cachegrind.yml +++ b/.github/workflows/benchmark-cachegrind.yml @@ -29,22 +29,25 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: "./.github/workflows/setup-luau" with: - token: "${{ secrets.BENCH_GITHUB_TOKEN }}" + runsOn: ${{ matrix.os }} + # - uses: actions/checkout@v3 + # with: + # token: "${{ secrets.BENCH_GITHUB_TOKEN }}" - - name: Build Luau - run: make config=release luau luau-analyze + # - name: Build Luau + # run: make config=release luau luau-analyze - - uses: actions/setup-python@v3 - with: - python-version: "3.9" - architecture: "x64" + # - uses: actions/setup-python@v3 + # with: + # python-version: "3.9" + # architecture: "x64" - - name: Install python dependencies - run: | - python -m pip install requests - python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose + # - name: Install python dependencies + # run: | + # python -m pip install requests + # python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose - name: Install valgrind run: | diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e994ac97..19aec95e 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -29,20 +29,23 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - - name: Build Luau - run: make config=release luau luau-analyze - - - uses: actions/setup-python@v3 + - uses: "./.github/workflows/setup-luau" with: - python-version: "3.9" - architecture: "x64" + runsOn: ${{ matrix.os }} + # - uses: actions/checkout@v3 - - name: Install python dependencies - run: | - python -m pip install requests - python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose + # - name: Build Luau + # run: make config=release luau luau-analyze + + # - uses: actions/setup-python@v3 + # with: + # python-version: "3.9" + # architecture: "x64" + + # - name: Install python dependencies + # run: | + # python -m pip install requests + # python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose - name: Run benchmark run: | diff --git a/.github/workflows/setup-luau.yml b/.github/workflows/setup-luau.yml new file mode 100644 index 00000000..9747daff --- /dev/null +++ b/.github/workflows/setup-luau.yml @@ -0,0 +1,28 @@ +name: Setup Luau + +on: + workflow_call: + inputs: + runsOn: + required: true + type: string + +jobs: + setup-luau: + name: Setup Luau + runs-on: ${{ inputs.runsOn }} + steps: + - uses: actions/checkout@v3 + + - name: Build Luau + run: make config=release luau luau-analyze + + - uses: actions/setup-python@v3 + with: + python-version: "3.9" + architecture: "x64" + + - name: Install python dependencies + run: | + python -m pip install requests + python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose