Skip to content

Commit

Permalink
chore(ci): include working cross-compile for linux platforms for open…
Browse files Browse the repository at this point in the history
…cl (#20)

Cross compile of linux binaries for opencl feature for x86_64, arm64 and
riscv64.
  • Loading branch information
leet4tari authored Oct 10, 2024
1 parent 3d779ee commit df9e939
Show file tree
Hide file tree
Showing 6 changed files with 668 additions and 495 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_binaries.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{
"name": "opencl-linux-arm64",
"runs-on": "ubuntu-latest",
"rust": "stable",
"rust": "nightly-2024-07-07",
"target": "aarch64-unknown-linux-gnu",
"cross": true,
"features": "opencl3",
Expand All @@ -28,7 +28,7 @@
{
"name": "opencl-linux-riscv64",
"runs-on": "ubuntu-latest",
"rust": "stable",
"rust": "nightly-2024-07-07",
"target": "riscv64gc-unknown-linux-gnu",
"cross": true,
"features": "opencl3",
Expand All @@ -37,7 +37,7 @@
},
{
"name": "opencl-macos-x86_64",
"runs-on": "macos-12",
"runs-on": "macos-13",
"rust": "stable",
"target": "x86_64-apple-darwin",
"cross": false,
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/build_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,32 @@ jobs:
--target ${{ matrix.builds.target }} \
--features "${{ matrix.builds.features }}" \
${{ matrix.builds.flags }} \
--bin xtrgpuminer
--bin ${{ env.TS_FILENAME }}
- name: Build release binaries
if: ${{ false }}
shell: bash
run: |
ls -alhtR target/${{ matrix.builds.target }}/${{ env.TS_BUILD }}/
- name: Sign Windows files with Trusted Certificate
if: ${{ ( startsWith(runner.os,'Windows') ) && ( env.AZURE_TENANT_ID != '' ) }}
env:
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
uses: azure/[email protected]
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: https://eus.codesigning.azure.net/
trusted-signing-account-name: Tari
certificate-profile-name: Tarilabs
files-folder: ${{ github.workspace }}/target/${{ matrix.builds.target }}/${{ env.TS_BUILD }}/
files-folder-filter: exe,dll
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256

- name: Archive and Checksum Binaries
shell: bash
run: |
Expand All @@ -265,7 +283,7 @@ jobs:
cd "$GITHUB_WORKSPACE/DIST"
echo "Copying files for ${{ env.BINFILE }} to $(pwd)"
ls -alht "$GITHUB_WORKSPACE/target/${{ matrix.builds.target }}/${{ env.TS_BUILD }}/"
cp -v $GITHUB_WORKSPACE/target/${{ matrix.builds.target }}/${{ env.TS_BUILD }}/xtrgpuminer${TS_EXT} .
cp -v $GITHUB_WORKSPACE/target/${{ matrix.builds.target }}/${{ env.TS_BUILD }}/${{ env.TS_FILENAME }}${TS_EXT} .
echo "Archive ${{ env.BINFILE }} too ${{ env.BINFILE }}.zip"
echo "Compute files shasum"
${SHARUN} * >> "${{ env.BINFILE }}.sha256"
Expand Down
Loading

0 comments on commit df9e939

Please sign in to comment.