Update rust.yml #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
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: Install 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 | |
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 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Initialize submodule | |
run: | | |
git submodule init | |
git submodule update | |
- name: Build for Windows | |
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" | |
.\amdgpu-install.exe -Install | |
# TODO |