Skip to content

github actions windows #24

github actions windows

github actions windows #24

Workflow file for this run

name: Rust
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
env:
CARGO_TERM_COLOR: always
jobs:
build-linux:
if: false
runs-on: ubuntu-22.04
permissions:
contents: write
pull-requests: write
repository-projects: write
steps:
- name: Prepare for build
run: |
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize submodule
run: |
git submodule init
git submodule update
- name: Prepare AMD HIP SDK
run: |
sudo apt update
wget https://repo.radeon.com/amdgpu-install/5.7.1/ubuntu/jammy/amdgpu-install_5.7.50701-1_all.deb
sudo apt install ./amdgpu-install_5.7.50701-1_all.deb
sudo apt update
- name: Install AMD HIP SDK
# can fail at dkms. ignore and continue
continue-on-error: true
run: sudo amdgpu-install --usecase=rocm,hip,hiplibsdk
- name: Build for Linux
run: |
cargo xtask --release
- name: Prepare for release
run: |
cd ./target/release
tar -czvf ZLUDA-linux-amd64.tar.gz *.so*
- name: Create Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: linux.${{ github.sha }}
release_name: Generated release
body: |
This release is automatically generated by GitHub Actions and not tested.
draft: false
prerelease: true
- name: Upload Linux artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/release/ZLUDA-linux-amd64.tar.gz
asset_name: ZLUDA-linux-amd64.tar.gz
asset_content_type: application/gzip
build-windows:
runs-on: windows-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize submodule
run: |
git submodule init
git submodule update
- name: Install AMD HIP SDK
run: |
C:\msys64\usr\bin\wget.exe https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-23.Q4-Win10-Win11-For-HIP.exe -O "amdgpu-install.exe"
mkdir unpacked
set PATH=%PATH%;C:\Program Files\7-Zip;.\unpacked
7z e .\amdgpu-install.exe -ounpacked -y
msiexec /i .\unpacked\ROCm_SDK_Core.msi /qn /norestart
msiexec /i .\unpacked\ROCm_Libs_Dev.msi /qn /norestart
msiexec /i .\unpacked\ROCm_Libs_RT.msi /qn /norestart
msiexec /i .\unpacked\ROCm_RTC_Dev.msi /qn /norestart
msiexec /i .\unpacked\ROCm_RTC_RT.msi /qn /norestart
msiexec /i .\unpacked\ROCm_RayTracing_Dev.msi /qn /norestart
msiexec /i .\unpacked\ROCm_RayTracing_RT.msi /qn /norestart
- name: Build for Windows
run: |
cargo xtask --release
- name: Prepare for release
run: |
cd ./target/release
7z ZLUDA-windows-amd64.zip *.dll
- name: Create Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: windows.${{ github.sha }}
release_name: Generated release
body: |
This release is automatically generated by GitHub Actions and not tested.
draft: false
prerelease: true
- name: Upload Windows artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/release/ZLUDA-windows-amd64.zip
asset_name: ZLUDA-windows-amd64.zip
asset_content_type: application/zip