From 11e3bfcb6a796544213dbb1302fedf9117b2d348 Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Mon, 12 Feb 2024 19:04:09 +0100 Subject: [PATCH] Fix GH actions Signed-off-by: Kemal Akkoyun --- .github/workflows/generate-python.yml | 17 +++++++++++------ .github/workflows/generate-ruby.yml | 2 +- .github/workflows/test.yml | 4 ++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/generate-python.yml b/.github/workflows/generate-python.yml index 716dadd..45e313b 100644 --- a/.github/workflows/generate-python.yml +++ b/.github/workflows/generate-python.yml @@ -1,6 +1,6 @@ --- name: Generate Python -'on': +"on": workflow_call: null push: branches: @@ -201,9 +201,14 @@ jobs: - name: Build run: make build - name: Generate python Offsets for ${{ matrix.python-version }} - run: >- - |- - | export python_version="${{ matrix.python-version }}" docker run --rm -v "${PWD}"/python-binaries:/tmp -w /tmp python:${{ matrix.python-version }} bash -c 'cp /usr/local/lib/libpython"${python_version%.*}"*.so.1.0 /tmp' ./structlayout -r python -v ${{ matrix.python-version }} -o offsets-python python-binaries/libpython"${python_version%.*}"*.so.1.0 git add offsets-python cp $(git diff --name-only --staged | xargs) offsets-python || echo "No new or modified files - offsets + run: | + export python_version="${{ matrix.python-version }}" + + docker run --rm -v "${PWD}"/python-binaries:/tmp -w /tmp python:${{ matrix.python-version }} bash -c 'cp /usr/local/lib/libpython"${python_version%.*}"*.so.1.0 /tmp' + + ./structlayout -r python -v ${{ matrix.python-version }} -o offsets-python python-binaries/libpython"${python_version%.*}"*.so.1.0 git add offsets-python + + cp $(git diff --name-only --staged | xargs) offsets-python || echo "No new or modified files - offsets are up to date" - name: Upload Offsets uses: actions/upload-artifact@v3 @@ -245,8 +250,8 @@ jobs: uses: peter-evans/create-pull-request@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - commit-message: 'chore: update python layout' - title: 'chore: update python layout' + commit-message: "chore: update python layout" + title: "chore: update python layout" body: This PR updates the python layout. branch: update-python-offsets-${{ github.run_number }} base: main diff --git a/.github/workflows/generate-ruby.yml b/.github/workflows/generate-ruby.yml index 0e968ac..5f5f138 100644 --- a/.github/workflows/generate-ruby.yml +++ b/.github/workflows/generate-ruby.yml @@ -133,7 +133,7 @@ jobs: run: make build - name: Generate Ruby Offsets for ${{ matrix.ruby-version }} run: | - docker run --rm -v "${PWD}"/ruby-binaries:/tmp -w /tmp ruby:${ruby_version}-slim cp /usr/local/lib/libruby.so.${{ matrix.ruby-version }} /tmp + docker run --rm -v "${PWD}"/ruby-binaries:/tmp -w /tmp ruby:${{ matrix.ruby-version }}-slim cp /usr/local/lib/libruby.so.${{ matrix.ruby-version }} /tmp ./structlayout -r ruby -v ${{ matrix.ruby-version }} -o offsets-ruby ruby-binaries/libruby.so.${{ matrix.ruby-version }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c5bb9e4..0623e26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,6 @@ --- name: Test -'on': +"on": workflow_call: null workflow_run: workflows: ["Build"] @@ -13,7 +13,7 @@ concurrency: jobs: test: runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' } + if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - name: Check out the code uses: actions/checkout@v4.1.1