Skip to content

Commit

Permalink
Merge pull request #7 from parca-dev/fix_gh_actions
Browse files Browse the repository at this point in the history
Fix GH actions
  • Loading branch information
kakkoyun authored Feb 12, 2024
2 parents 2e7fb73 + 11e3bfc commit 3f071af
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/generate-python.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Generate Python
'on':
"on":
workflow_call: null
push:
branches:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Test
'on':
"on":
workflow_call: null
workflow_run:
workflows: ["Build"]
Expand All @@ -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/[email protected]
Expand Down

0 comments on commit 3f071af

Please sign in to comment.