mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-08-02 22:30:41 +00:00
Dont build with full optimization in PRs
This commit is contained in:
parent
d84fa05e87
commit
aaf7736058
2 changed files with 73 additions and 9 deletions
|
@ -1,12 +1,11 @@
|
||||||
name: ZLUDA
|
name: ZLUDA
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
CARGO_PROFILE: release
|
||||||
ROCM_VERSION: "6.3.1"
|
ROCM_VERSION: "6.3.1"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -35,16 +34,16 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
# https://github.com/actions/upload-artifact/issues/39
|
# https://github.com/actions/upload-artifact/issues/39
|
||||||
run: |
|
run: |
|
||||||
cargo xtask zip --profile release-lto
|
cargo xtask zip --profile {{ env.CARGO_PROFILE }}
|
||||||
mkdir target/release-lto/zluda
|
mkdir target/{{ env.CARGO_PROFILE }}/zluda
|
||||||
tar -xzf target/release-lto/zluda.tar.gz -C target/release-lto/zluda
|
tar -xzf target/{{ env.CARGO_PROFILE }}/zluda.tar.gz -C target/{{ env.CARGO_PROFILE }}/zluda
|
||||||
- name: Set revision hash
|
- name: Set revision hash
|
||||||
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: zluda-linux-${{ env.SHORT_SHA }}
|
name: zluda-linux-${{ env.SHORT_SHA }}
|
||||||
path: target/release-lto/zluda
|
path: target/{{ env.CARGO_PROFILE }}/zluda
|
||||||
build_windows:
|
build_windows:
|
||||||
name: Build (Windows)
|
name: Build (Windows)
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
|
@ -55,12 +54,12 @@ jobs:
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cargo xtask zip --profile release-lto
|
cargo xtask zip --profile {{ env.CARGO_PROFILE }}
|
||||||
Expand-Archive -Path target/release-lto/zluda.zip -DestinationPath target/release-lto/zluda
|
Expand-Archive -Path target/{{ env.CARGO_PROFILE }}/zluda.zip -DestinationPath target/{{ env.CARGO_PROFILE }}/zluda
|
||||||
- name: Set revision hash
|
- name: Set revision hash
|
||||||
run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 7))" >> $env:GITHUB_ENV
|
run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 7))" >> $env:GITHUB_ENV
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: zluda-windows-${{ env.SHORT_SHA }}
|
name: zluda-windows-${{ env.SHORT_SHA }}
|
||||||
path: target/release-lto/zluda
|
path: target/{{ env.CARGO_PROFILE }}/zluda
|
65
.github/workflows/push_master.yml
vendored
Normal file
65
.github/workflows/push_master.yml
vendored
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
name: ZLUDA
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
CARGO_PROFILE: release-lto
|
||||||
|
ROCM_VERSION: "6.3.1"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_linux:
|
||||||
|
name: Build (Linux)
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- uses: jlumbroso/free-disk-space@main
|
||||||
|
- name: Install ROCm
|
||||||
|
run: |
|
||||||
|
sudo mkdir --parents --mode=0755 /etc/apt/keyrings
|
||||||
|
sudo sh -c 'wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | tee /etc/apt/keyrings/rocm.gpg > /dev/null'
|
||||||
|
sudo sh -c 'echo deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/${{ env.ROCM_VERSION }} jammy main > /etc/apt/sources.list.d/rocm.list'
|
||||||
|
sudo sh -c 'echo Package: * > /etc/apt/preferences.d/rocm-pin-600'
|
||||||
|
sudo sh -c 'echo Pin: release o=repo.radeon.com >> /etc/apt/preferences.d/rocm-pin-600'
|
||||||
|
sudo sh -c 'echo Pin-Priority: 600 >> /etc/apt/preferences.d/rocm-pin-600'
|
||||||
|
sudo apt-get update
|
||||||
|
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends rocm-smi-lib rocm-llvm-dev hip-runtime-amd hip-dev
|
||||||
|
echo 'export PATH="$PATH:/opt/rocm/bin"' | sudo tee /etc/profile.d/rocm.sh
|
||||||
|
echo '/opt/rocm/lib' | sudo tee /etc/ld.so.conf.d/rocm.conf
|
||||||
|
sudo ldconfig
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
- name: Build
|
||||||
|
# https://github.com/actions/upload-artifact/issues/39
|
||||||
|
run: |
|
||||||
|
cargo xtask zip --profile {{ env.CARGO_PROFILE }}
|
||||||
|
mkdir target/{{ env.CARGO_PROFILE }}/zluda
|
||||||
|
tar -xzf target/{{ env.CARGO_PROFILE }}/zluda.tar.gz -C target/{{ env.CARGO_PROFILE }}/zluda
|
||||||
|
- name: Set revision hash
|
||||||
|
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: zluda-linux-${{ env.SHORT_SHA }}
|
||||||
|
path: target/{{ env.CARGO_PROFILE }}/zluda
|
||||||
|
build_windows:
|
||||||
|
name: Build (Windows)
|
||||||
|
runs-on: windows-2022
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cargo xtask zip --profile {{ env.CARGO_PROFILE }}
|
||||||
|
Expand-Archive -Path target/{{ env.CARGO_PROFILE }}/zluda.zip -DestinationPath target/{{ env.CARGO_PROFILE }}/zluda
|
||||||
|
- name: Set revision hash
|
||||||
|
run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 7))" >> $env:GITHUB_ENV
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: zluda-windows-${{ env.SHORT_SHA }}
|
||||||
|
path: target/{{ env.CARGO_PROFILE }}/zluda
|
Loading…
Add table
Add a link
Reference in a new issue