From 939ee20ac1af720c26089afd39f4cb0f4e679f5e Mon Sep 17 00:00:00 2001 From: James Kessler Date: Sun, 29 Sep 2024 23:55:37 -0700 Subject: [PATCH] Fix issues with referencing binaries as outputs from a previous step. --- .github/workflows/build.yml | 61 ++++++++++++++++++++++--------------- .github/workflows/ci.yml | 6 ++++ 2 files changed, 43 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2aff563..115a1d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,17 +89,18 @@ jobs: run: make build-xbuild-container - name: Build cross-compiled linux binaries + id: build run: | make compile-and-strip-all - echo "::set-output name=coveralls_x86_64::dist/coveralls-linux-x86_64" - echo "::set-output name=coveralls_aarch64::dist/coveralls-linux-aarch64" + echo "coveralls_x86_64=dist/coveralls-linux-x86_64" >> $GITHUB_OUTPUT + echo "coveralls_aarch64=dist/coveralls-linux-aarch64" >> $GITHUB_OUTPUT - name: Package linux binaries run: make package - # Debug step to verify what files are in the dist/ directory - - name: List files in dist/ directory - run: ls -la dist/ + # # Debug step to verify what files are in the dist/ directory + # - name: List files in dist/ directory + # run: ls -la dist/ - name: Upload linux binaries uses: actions/upload-artifact@v4 @@ -108,9 +109,9 @@ jobs: path: dist/* if-no-files-found: error - # Debug step to verify what files are in the dist/ directory - - name: List files in dist/ directory - run: ls -la dist/ + # # Debug step to verify what files are in the dist/ directory + # - name: List files in dist/ directory + # run: ls -la dist/ test-linux-x86_64: runs-on: ubuntu-latest @@ -119,25 +120,29 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # - name: Download x86_64 binary + # # Download the coverage report generated from ci.yml + # - name: Download coverage report # uses: actions/download-artifact@v4 # with: - # name: coveralls-linux-x86_64 - # path: ./binaries/ + # name: coverage-report + # path: ./coverage/ - # - name: Set executable permissions for x86_64 binary - # run: chmod +x ./binaries/coveralls-linux-x86_64 - - # - name: Test x86_64 binary - # run: ./binaries/coveralls-linux-x86_64 --version - - # Using output from build-linux job + # Set executable permissions for x86_64 binary and check version - name: Test x86_64 binary run: | binary=${{ needs.build-linux.outputs.x86_64_binary }} chmod +x $binary $binary --version + # # Report coverage using the x86_64 binary + # - name: Report coverage with x86_64 binary + # env: + # COVERALLS_REPO_TOKEN: ${{ github.token }} + # run: | + # binary=${{ needs.build-linux.outputs.x86_64_binary }} + # cd coverage + # $binary report --measure --base-path src/coverage_reporter/ + test-linux-aarch64: runs-on: ubuntu-latest needs: build-linux @@ -145,15 +150,14 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # - name: Download aarch64 binary + # # Download the coverage report generated from ci.yml + # - name: Download coverage report # uses: actions/download-artifact@v4 # with: - # name: coveralls-linux-aarch64 - # path: ./binaries/ + # name: coverage-report + # path: ./coverage/ - # - name: Set executable permissions for aarch64 binary - # run: chmod +x ./binaries/coveralls-linux-aarch64 - + # Set executable permissions for aarch64 binary and check version - name: Test aarch64 binary in QEMU run: | binary=${{ needs.build-linux.outputs.aarch64_binary }} @@ -162,6 +166,15 @@ jobs: sudo apt-get install -y qemu-user qemu-aarch64 $binary --version + # # Report coverage using the tested aarch64 binary + # - name: Report coverage with aarch64 binary + # env: + # COVERALLS_REPO_TOKEN: ${{ github.token }} + # run: | + # binary=${{ needs.build-linux.outputs.aarch64_binary }} + # cd coverage + # qemu-aarch64 $binary report --measure --base-path src/coverage_reporter/ + release: runs-on: ubuntu-latest needs: [build-windows, build-linux] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b84d0e3..9a82862 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,3 +68,9 @@ jobs: run: | cd coverage ../bin/coveralls report --measure --base-path src/coverage_reporter/ + + # - name: Upload coverage report + # uses: actions/upload-artifact@v4 + # with: + # name: coverage-report + # path: coverage/