Skip to content

update gradle build yml #289

update gradle build yml

update gradle build yml #289

Workflow file for this run

name: Gradle build and test
on:
push:
workflow_dispatch:
jobs:
install-build-and-test:
runs-on: windows-latest
env:
CYDER_PYTHON_EXECUTABLE_PATH: ./cyderenv/Scripts/python.exe
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17.0.6'
distribution: 'temurin'
- name: Install dependencies on Windows and set up virtual environment
shell: powershell
run: |
choco install ffmpeg python
python -m pip install --upgrade pip
pip install mutagen
python -m venv cyderenv
.\cyderenv\Scripts\Activate
.\cyderenv\Scripts\pip install --upgrade pip
Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/4.0/Scream4.0.zip -OutFile Scream4.0.zip
Expand-Archive -Path Scream4.0.zip -DestinationPath Scream
openssl req -batch -verbose -x509 -newkey rsa -keyout ScreamCertificate.pvk -out ScreamCertificate.cer -nodes -extensions v3_req
openssl pkcs12 -export -nodes -in ScreamCertificate.cer -inkey ScreamCertificate.pvk -out ScreamCertificate.pfx -passout pass:
- name: Setup MSVC Dev Cmd
uses: ilammy/msvc-dev-cmd@v1
- name: Sign and Install Scream Driver on Windows
shell: powershell
run: |
$env:PATH += ';C:\Program Files (x86)\Windows Kits\10\bin\x64'
signtool sign /v /fd SHA256 /f ScreamCertificate.pfx Scream\Install\driver\x64\Scream.cat
Import-Certificate -FilePath ScreamCertificate.cer -CertStoreLocation Cert:\LocalMachine\root
Import-Certificate -FilePath ScreamCertificate.cer -CertStoreLocation Cert:\LocalMachine\TrustedPublisher
Scream\Install\helpers\devcon-x64.exe install Scream\Install\driver\x64\Scream.inf *Scream
timeout-minutes: 5
- name: Start Windows Audio Service
run: net start audiosrv
shell: powershell
- name: Build with Gradle
run: ./gradlew clean build --info --stacktrace --no-daemon
env:
CYDER_PYTHON_EXECUTABLE_PATH: ${{ env.CYDER_PYTHON_EXECUTABLE_PATH }}
- name: Generate code coverage with JaCoCo
run: ./gradlew jacocoTestReport
env:
IP_KEY: ${{ secrets.IP_KEY }}
CYDER_PYTHON_EXECUTABLE_PATH: ${{ env.CYDER_PYTHON_EXECUTABLE_PATH }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
file: ./build/reports/jacoco/test/xml/index.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: always()
- name: Upload Test Reports
uses: actions/upload-artifact@v3
with:
name: test-reports
path: build/reports/tests/test/
if: always()
- name: Upload Test Results
uses: actions/upload-artifact@v3
with:
name: test-results
path: build/test-results/
if: always()