Skip to content

test-binaries

test-binaries #23

Workflow file for this run

name: test-binaries
on:
workflow_run:
workflows: [build]
types:
- completed
jobs:
test_binaries:
name: Test Multi-Arch Binaries
runs-on: ubuntu-22.04
strategy:
matrix:
arch: [x86_64, aarch64]
steps:
- name: Checkout code
uses: actions/checkout@v4
# 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.event.workflow_run.id }}/artifacts" | jq '.artifacts[] | .name'
- name: Download built artifacts (linux binaries)
uses: actions/download-artifact@v4
with:
name: coveralls-linux-binaries
path: ./binaries/
# Debug step to list available artifacts
- name: List available artifacts in ./binaries/
run: ls -la ./binaries/
- name: Download coverage report
uses: actions/download-artifact@v4
with:
name: coverage-report # Assuming this is the name of the artifact from the build.yml run
path: ./coverage/
# Run the binary inside a Docker container with the correct architecture
- name: Test Binary in Architecture-Specific Docker Container
run: |
if [ "${{ matrix.arch }}" = "x86_64" ]; then
make ubuntu-x86_64 && ./binaries/coveralls-linux-x86_64 report --measure --base-path src/coverage_reporter/;
elif [ "${{ matrix.arch }}" = "aarch64" ]; then
make ubuntu-aarch64 && ./binaries/coveralls-linux-aarch64 report --measure --base-path src/coverage_reporter/;
fi
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}