#!/bin/bash #Implicit set -euo pipefail # function to be used by any pipeline stage function get_custom_library() { curl -LO https://archive.ppy.sh/$2/$1.tar.gz } # @pipeline prepare_dotnet() { curl -L https://dot.net/v1/dotnet-install.sh | bash bake_info "Successfully installed dotnet" } # @pipeline fetch_source() { git clone https://github.com/ppy/osu.git --depth 1 } # @pipeline # @if(WS_PIPELINE_ARCH == amd64) # @timeout(720) # @retry(3, 5) # @parallel fetch_library() { get_custom_library ffmpeg amd64 get_custom_library libesqlite3 amd64 get_custom_library libbass amd64 } # @pipeline # @fallible # @parallel fetch_osu_framework() { cd .. git clone https://github.com/ppy/osu-framework.git --depth 1 } # @pipeline # @timeout(600) restore_workload() { cd osu dotnet workload restore } # @pipeline # @export set_environment() { export DOTNET_ENVIRONMENT=Production } # @pipeline # @export build() { dotnet build osu.Desktop dotnet publish osu.Desktop -o osu-build --sc } # @pipeline # @loop(3) test() { dotnet test } # @pipeline # @parallel # @after(fetch_library) compress_library() { mkdir -p osu-native cp osu-build/*.so ../osu-native tar -cf osu-native osu-native.tar zstd osu.tar } # @pipeline # @after(test) compress_artifact() { tar -cf osu osu.tar zstd osu.tar }