cavis/.gitea/workflows/build-windows.yaml

79 lines
3.3 KiB
YAML

name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
env:
OS: ubuntu2004
cudnn_version: 8.9.4.25
cuda_version: cuda12.2
CMAKE_VER: 3.27.4
jobs:
Explore-Gitea-Actions:
runs-on: windows:docker://yunfandev/visualstudio
steps:
- run: echo "The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- name: Update initial docker image with apt-get
run: |
apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -qq install -y wget software-properties-common && \
wget https://developer.download.nvidia.com/compute/cuda/repos/$OS/x86_64/cuda-$OS.pin && \
mv cuda-$OS.pin /etc/apt/preferences.d/cuda-repository-pin-600 && \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/$OS/x86_64/7fa2af80.pub && \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/$OS/x86_64/3bf863cc.pub && \
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/$OS/x86_64/ /" && \
apt-get -qq update && apt-get -qq upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get -qq install -y \
build-essential checkinstall zlib1g-dev libssl-dev git libpthread-stubs0-dev \
libcudnn8=$cudnn_version-1+$cuda_version libcudnn8-dev=$cudnn_version-1+$cuda_version \
libblas{3,-dev} liblapack{3,-dev} libatlas-base-dev libopenblas-dev && \
wget -q https://developer.download.nvidia.com/compute/cuda/12.2.1/local_installers/cuda_12.2.1_535.86.10_linux.run && \
sh cuda_12.2.1_535.86.10_linux.run --silent --toolkit
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '11'
cache: 'gradle'
- name: Install CMake and Ninja
uses: lukka/get-cmake@latest
with:
useLocalCache: true
useCloudCache: false
cmakeVersion: "~3.27.0"
ninjaVersion: latest
- name: Execute Gradle build
run: |
sh ./gradlew build \
--stacktrace \
-Pmavenuser=${{ secrets.MAVENUSER }} \
-Pmavenpass=${{ secrets.MAVENPASS }} \
-PossrhUsername=${{ secrets.OSSRHUSERNAME }} \
-PossrhPassword=${{ secrets.OSSRHPASSWORD }} \
-PCAVIS_CHIP=cpu,cuda -Pskip-native=false \
>buildlog.log 2>&1
- name: Upload log
uses: actions/upload-artifact@v3
if: success() || failure() # run this step even if previous step failed
with:
name: my-artifact
path: buildlog.log
- run: echo "This job's status is ${{ job.status }}."