Skip to content

ci: Install NuGet for Ubuntu 24.04, Upload v4 #94

ci: Install NuGet for Ubuntu 24.04, Upload v4

ci: Install NuGet for Ubuntu 24.04, Upload v4 #94

Workflow file for this run

# Workflow that builds and tests Actinic on Windows and Ubuntu Linux
name: Actinic CI
on:
push:
pull_request:
schedule:
# * is a special character in YAML so you have to quote this string
# Run at 13:37 on the 11th of every month (odd time to reduce load)
- cron: '37 13 11 * *'
# Can't use simpler definition of [ push, pull_request, schedule ]
# See https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events
jobs:
build-linux:
name: Linux
runs-on: ubuntu-latest
steps:
- name: Update repositories for dependencies
run: sudo apt update
- name: Install dependencies for PulseAudio Impulse library
run: sudo apt install libpulse-dev libfftw3-dev
# Now included by default (used for light system):
# libmono-system-core4.0-cil, libmono-system-drawing4.0-cil
- name: Check out source code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Install dependencies for legacy NuGet support
run: |
APT_PPA_KEYFILE="/etc/apt/keyrings/custom-mono-official-vs.gpg"
wget --output-document=- "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" | sudo gpg --dearmour --output=- | sudo tee "$APT_PPA_KEYFILE" >/dev/null
echo "deb [signed-by=$APT_PPA_KEYFILE] https://download.mono-project.com/repo/ubuntu vs-bionic main # MonoDevelop" | sudo tee "/etc/apt/sources.list.d/mono-official-vs.list" >/dev/null
sudo apt update
sudo apt install nuget mono msbuild
- name: Restore dependencies
run: |
dotnet restore
nuget restore # Legacy dependencies
- name: Build with debugging
run: make
env:
DEBUG: 1
- name: Build release
run: make
- name: Test
run: make test
# dotnet core is not (yet?) supported by MonoDevelop
# - name: Build
# run: dotnet build --no-restore
# - name: Test
# run: dotnet test --no-build --verbosity normal
- name: Save build information
run: |
echo "Actinic" >> ${{ github.workspace }}/Actinic/bin/Debug/build-info.txt
echo "https://github.com/digitalcircuit/actinic/" >> ${{ github.workspace }}/Actinic/bin/Debug/build-info.txt
echo "--------" >> ${{ github.workspace }}/Actinic/bin/Debug/build-info.txt
git describe --always --long >> ${{ github.workspace }}/Actinic/bin/Debug/build-info.txt
#
echo "Commit hash: ${{ github.sha }}" >> ${{ github.workspace }}/Actinic/bin/Debug/build-info.txt
echo "Run ID: ${{ github.run_id }}" >> ${{ github.workspace }}/Actinic/bin/Debug/build-info.txt
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Actinic-Linux
path: |
${{ github.workspace }}/Actinic/bin/Debug/build-info.txt
${{ github.workspace }}/Actinic/bin/Debug/*.exe
${{ github.workspace }}/Actinic/bin/Debug/*.so
if-no-files-found: error # Require an artifact
build-windows:
name: Windows
runs-on: windows-latest
steps:
- name: Check out source code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
- name: Restore dependencies
run: |
dotnet restore
nuget restore # Legacy dependencies
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Save build information
run: |
echo "Actinic" >> ${{ github.workspace }}\Actinic\bin\Debug\build-info.txt
echo "https://github.com/digitalcircuit/actinic/" >> ${{ github.workspace }}\Actinic\bin\Debug\build-info.txt
echo "--------" >> ${{ github.workspace }}\Actinic\bin\Debug\build-info.txt
git describe --always --long >> ${{ github.workspace }}\Actinic\bin\Debug\build-info.txt
#
echo "Commit hash: ${{ github.sha }}" >> ${{ github.workspace }}\Actinic\bin\Debug\build-info.txt
echo "Run ID: ${{ github.run_id }}" >> ${{ github.workspace }}\Actinic\bin\Debug\build-info.txt
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Actinic-Windows
path: |
${{ github.workspace }}\Actinic\bin\Debug\build-info.txt
${{ github.workspace }}\Actinic\bin\Debug\*.exe
if-no-files-found: error # Require an artifact