2023-09-01 10:31:56 +02:00
|
|
|
name: Gitea Actions Demo
|
|
|
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
|
|
on: [push]
|
|
|
|
|
2023-09-01 13:21:17 +02:00
|
|
|
env:
|
|
|
|
OS: ubuntu2004
|
|
|
|
cudnn_version: 8.9.4.25
|
|
|
|
cuda_version: cuda12.2
|
|
|
|
CMAKE_VER: 3.27.4
|
|
|
|
|
2023-09-01 10:31:56 +02:00
|
|
|
jobs:
|
|
|
|
Explore-Gitea-Actions:
|
2023-09-01 10:41:57 +02:00
|
|
|
runs-on: ubuntu-20.04:docker://nvidia/cuda:12.2.0-devel-ubuntu20.04
|
2023-09-01 10:31:56 +02:00
|
|
|
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 }}
|
|
|
|
|
2023-09-01 13:21:17 +02:00
|
|
|
- name: Update initial docker image with apt-get
|
|
|
|
run: |
|
2023-09-01 13:24:30 +02:00
|
|
|
apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -qq install -y wget software-properties-common && \
|
2023-09-01 19:28:21 +02:00
|
|
|
|
|
|
|
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/ /" && \
|
2023-09-01 13:21:17 +02:00
|
|
|
|
2023-09-01 13:24:30 +02:00
|
|
|
apt-get -qq update && apt-get -qq upgrade -y && \
|
2023-09-01 19:28:21 +02:00
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get -qq install -y \
|
2023-09-01 13:21:17 +02:00
|
|
|
build-essential checkinstall zlib1g-dev libssl-dev git libpthread-stubs0-dev \
|
2023-09-01 19:28:21 +02:00
|
|
|
libcudnn8=$cudnn_version-1+$cuda_version libcudnn8-dev=$cudnn_version-1+$cuda_version \
|
2023-09-01 13:21:17 +02:00
|
|
|
cuda-drivers
|
2023-09-01 13:24:30 +02:00
|
|
|
|
2023-09-01 10:41:57 +02:00
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
|
|
|
java-version: '11'
|
2023-09-01 13:21:17 +02:00
|
|
|
cache: 'gradle'
|
2023-09-01 10:41:57 +02:00
|
|
|
|
2023-09-01 13:09:08 +02:00
|
|
|
- name: Install CMake and Ninja
|
|
|
|
uses: lukka/get-cmake@latest
|
|
|
|
with:
|
|
|
|
useLocalCache: true
|
|
|
|
useCloudCache: false
|
|
|
|
cmakeVersion: "~3.27.0"
|
|
|
|
ninjaVersion: latest
|
|
|
|
|
2023-09-01 10:31:56 +02:00
|
|
|
- name: Execute Gradle build
|
2023-09-01 12:50:49 +02:00
|
|
|
run: |
|
|
|
|
sh ./gradlew build \
|
2023-09-01 13:09:08 +02:00
|
|
|
--stacktrace \
|
2023-09-01 12:48:39 +02:00
|
|
|
-Pmavenuser=${{ secrets.MAVENUSER }} \
|
|
|
|
-Pmavenpass=${{ secrets.MAVENPASS }} \
|
|
|
|
-PossrhUsername=${{ secrets.OSSRHUSERNAME }} \
|
|
|
|
-PossrhPassword=${{ secrets.OSSRHPASSWORD }} \
|
|
|
|
-PCAVIS_CHIP=cpu -Pskip-native=false
|
2023-09-01 10:31:56 +02:00
|
|
|
|
|
|
|
- run: echo "This job's status is ${{ job.status }}."
|