Skip to content

Commit

Permalink
Test Linux Binaries after they're built in CI (Cont'd) (#157)
Browse files Browse the repository at this point in the history
* Add new debug step to test-binaries workflow to address artifact-download issue.
* Add new workflow, test-binaries-qemu, to test binaries in QEMU emulation. 
* Merge to master asap to see changes as these workflows only run on our default branch.
  • Loading branch information
afinetooth committed Sep 27, 2024
1 parent 42b4ab7 commit 4bdd73f
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 5 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/test-binaries-qemu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: test-binaries-qemu

on:
workflow_run:
workflows: [build]
types:
- completed

jobs:
test-x86_64:
runs-on: ubuntu-22.04
steps:
# Debug step to list artifacts for the run
- name: List available artifacts
run: |
echo "Available artifacts:"
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" | jq '.artifacts[] | .name'
- name: Download coveralls-linux-x86_64 binary
uses: actions/download-artifact@v4
with:
name: coveralls-linux-binaries
path: ./artifacts
- name: Test binary
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
chmod +x ./artifacts/coveralls-linux-x86_64
./artifacts/coveralls-linux-x86_64 --version
./artifacts/coveralls-linux-x86_64 report --measure --base-path src/coverage_reporter/
test-aarch64:
runs-on: ubuntu-22.04
steps:
# Debug step to list artifacts for the run
- name: List available artifacts
run: |
echo "Available artifacts:"
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" | jq '.artifacts[] | .name'
- name: Set up QEMU for aarch64 emulation
uses: docker/setup-qemu-action@v3
with:
platforms: linux/arm64 # Or qemu-aarch64?
- name: Download coveralls-linux-aarch64 binary
uses: actions/download-artifact@v4
with:
name: coveralls-linux-binaries
path: ./artifacts
- name: Test binary
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
chmod +x ./artifacts/coveralls-linux-aarch64
./artifacts/coveralls-linux-aarch64 --version
./artifacts/coveralls-linux-aarch64 report --measure --base-path src/coverage_reporter/
11 changes: 6 additions & 5 deletions .github/workflows/test-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

# # Debug Step to Print Event Context
# - name: Print event context
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# run: echo "$GITHUB_CONTEXT"
# Debug step to list artifacts for the run
- name: List available artifacts
run: |
echo "Available artifacts:"
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" | jq '.artifacts[] | .name'
- name: Download built artifacts (linux binaries)
uses: actions/download-artifact@v4
Expand Down

0 comments on commit 4bdd73f

Please sign in to comment.