From 30ec203effac33896e25f67d9e30ea4ac649cc5c Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Sun, 10 Feb 2019 20:57:31 +0100 Subject: [PATCH 1/5] Added first test for dotnet-compat ABI testing to drone. --- .drone.yml | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++ .editorconfig | 4 +++ 2 files changed, 100 insertions(+) diff --git a/.drone.yml b/.drone.yml index 98db4884bd..5493e427c6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,7 +6,103 @@ steps: image: docker:git commands: - git submodule update --init --recursive + - name: build image: microsoft/dotnet:2-sdk commands: - dotnet publish --configuration release --output /release Jellyfin.Server + +- name: clone-dotnet-compat + image: docker:git + commands: + - git clone --depth 1 https://github.com/EraYaN/dotnet-compatibility + when: + event: + - pull_request + +- name: build-dotnet-compat + image: microsoft/dotnet:2-sdk + commands: + - dotnet publish --configuration release --output /tools dotnet-compatibility/CompatibilityCheckerCoreCLI + when: + event: + - pull_request + +- name: download-last-nuget-release-common + image: plugins/download + settings: + source: https://www.nuget.org/api/v2/package/Jellyfin.Common + destination: Jellyfin.Common.nupkg + when: + event: + - pull_request + +- name: download-last-nuget-release-model + image: plugins/download + settings: + source: https://www.nuget.org/api/v2/package/Jellyfin.Model + destination: Jellyfin.Model.nupkg + when: + event: + - pull_request + +- name: download-last-nuget-release-controller + image: plugins/download + settings: + source: https://www.nuget.org/api/v2/package/Jellyfin.Controller + destination: Jellyfin.Controller.nupkg + when: + event: + - pull_request + +- name: download-last-nuget-release-naming + image: plugins/download + settings: + source: https://www.nuget.org/api/v2/package/Jellyfin.Naming + destination: Jellyfin.Naming.nupkg + when: + event: + - pull_request + +- name: extract-downloaded-nuget-packages + image: garthk/unzip + commands: + - unzip -j Jellyfin.Common.nupkg "*.dll" -d /current-release + - unzip -j Jellyfin.Model.nupkg "*.dll" -d /current-release + - unzip -j Jellyfin.Controller.nupkg "*.dll" -d /current-release + - unzip -j Jellyfin.Naming.nupkg "*.dll" -d /current-release + when: + event: + - pull_request + +- name: run-dotnet-compat-common + image: microsoft/dotnet:2-runtime + commands: + - dotnet /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Common.dll /release/Jellyfin.Common.dll + when: + event: + - pull_request + +- name: run-dotnet-compat-model + image: microsoft/dotnet:2-runtime + commands: + - dotnet /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Model.dll /release/Jellyfin.Model.dll + when: + event: + - pull_request + +- name: run-dotnet-compat-controller + image: microsoft/dotnet:2-runtime + commands: + - dotnet /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Controller.dll /release/Jellyfin.Controller.dll + when: + event: + - pull_request + +- name: run-dotnet-compat-naming + image: microsoft/dotnet:2-runtime + commands: + - dotnet /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Naming.dll /release/Jellyfin.Naming.dll + when: + event: + - pull_request diff --git a/.editorconfig b/.editorconfig index b2891188d8..5034f364e2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,6 +15,10 @@ insert_final_newline = true end_of_line = lf max_line_length = null +# YAML indentation +[*.{yml,yaml}] +indent_size = 2 + # XML indentation [*.{csproj,xml}] indent_size = 2 From 236e21efcb8ad0bbad2b3d0b6fc8735f3659d291 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Sun, 10 Feb 2019 21:04:39 +0100 Subject: [PATCH 2/5] Fixed extension of compat checker and added err_ignore flag. --- .drone.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5493e427c6..82a9ce7da1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -77,32 +77,36 @@ steps: - name: run-dotnet-compat-common image: microsoft/dotnet:2-runtime + err_ignore: true commands: - - dotnet /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Common.dll /release/Jellyfin.Common.dll + - dotnet /tools/CompatibilityCheckerCoreCLI.dll /current-release/Jellyfin.Common.dll /release/Jellyfin.Common.dll when: event: - pull_request - name: run-dotnet-compat-model image: microsoft/dotnet:2-runtime + err_ignore: true commands: - - dotnet /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Model.dll /release/Jellyfin.Model.dll + - dotnet /tools/CompatibilityCheckerCoreCLI.dll /current-release/Jellyfin.Model.dll /release/Jellyfin.Model.dll when: event: - pull_request - name: run-dotnet-compat-controller image: microsoft/dotnet:2-runtime + err_ignore: true commands: - - dotnet /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Controller.dll /release/Jellyfin.Controller.dll + - dotnet /tools/CompatibilityCheckerCoreCLI.dll /current-release/Jellyfin.Controller.dll /release/Jellyfin.Controller.dll when: event: - pull_request - name: run-dotnet-compat-naming image: microsoft/dotnet:2-runtime + err_ignore: true commands: - - dotnet /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Naming.dll /release/Jellyfin.Naming.dll + - dotnet /tools/CompatibilityCheckerCoreCLI.dll /current-release/Jellyfin.Naming.dll /release/Jellyfin.Naming.dll when: event: - pull_request From 29d678347187ab85a597c88ea72b2ce752094b37 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Sun, 10 Feb 2019 21:10:03 +0100 Subject: [PATCH 3/5] Switched to debian for the compat runners. --- .drone.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index 82a9ce7da1..95fe94e704 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,7 +23,7 @@ steps: - name: build-dotnet-compat image: microsoft/dotnet:2-sdk commands: - - dotnet publish --configuration release --output /tools dotnet-compatibility/CompatibilityCheckerCoreCLI + - dotnet publish --runtime debian.9-x64 --configuration release --output /tools dotnet-compatibility/CompatibilityCheckerCoreCLI when: event: - pull_request @@ -76,37 +76,37 @@ steps: - pull_request - name: run-dotnet-compat-common - image: microsoft/dotnet:2-runtime + image: debian:stretch err_ignore: true commands: - - dotnet /tools/CompatibilityCheckerCoreCLI.dll /current-release/Jellyfin.Common.dll /release/Jellyfin.Common.dll + - /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Common.dll /release/Jellyfin.Common.dll when: event: - pull_request - name: run-dotnet-compat-model - image: microsoft/dotnet:2-runtime + image: debian:stretch err_ignore: true commands: - - dotnet /tools/CompatibilityCheckerCoreCLI.dll /current-release/Jellyfin.Model.dll /release/Jellyfin.Model.dll + - /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Model.dll /release/Jellyfin.Model.dll when: event: - pull_request - name: run-dotnet-compat-controller - image: microsoft/dotnet:2-runtime + image: debian:stretch err_ignore: true commands: - - dotnet /tools/CompatibilityCheckerCoreCLI.dll /current-release/Jellyfin.Controller.dll /release/Jellyfin.Controller.dll + - /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Controller.dll /release/Jellyfin.Controller.dll when: event: - pull_request - name: run-dotnet-compat-naming - image: microsoft/dotnet:2-runtime + image: debian:stretch err_ignore: true commands: - - dotnet /tools/CompatibilityCheckerCoreCLI.dll /current-release/Jellyfin.Naming.dll /release/Jellyfin.Naming.dll + - /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Naming.dll /release/Jellyfin.Naming.dll when: event: - pull_request From 8055b70ab13fb0b06bc8bc81adc6f8bc1ce38b6c Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Tue, 12 Feb 2019 16:21:46 +0100 Subject: [PATCH 4/5] Fixed full pipeline, runs correctly now with `drone exec` --- .dockerignore | 1 + .drone.yml | 71 ++++++++++++++------------------------------------- .gitignore | 2 ++ 3 files changed, 22 insertions(+), 52 deletions(-) diff --git a/.dockerignore b/.dockerignore index 45e5435258..ffd6de2d66 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,3 +8,4 @@ README.md deployment/*/dist deployment/*/pkg-dist deployment/collect-dist/ +ci/ diff --git a/.drone.yml b/.drone.yml index 95fe94e704..f1212d3f96 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,103 +10,70 @@ steps: - name: build image: microsoft/dotnet:2-sdk commands: - - dotnet publish --configuration release --output /release Jellyfin.Server + - dotnet publish "Jellyfin.Server" --configuration Release --output "../ci/ci-release" - name: clone-dotnet-compat image: docker:git commands: - - git clone --depth 1 https://github.com/EraYaN/dotnet-compatibility - when: - event: - - pull_request + - git clone --depth 1 https://github.com/EraYaN/dotnet-compatibility ci/dotnet-compatibility - name: build-dotnet-compat image: microsoft/dotnet:2-sdk commands: - - dotnet publish --runtime debian.9-x64 --configuration release --output /tools dotnet-compatibility/CompatibilityCheckerCoreCLI - when: - event: - - pull_request + - dotnet publish "ci/dotnet-compatibility/CompatibilityCheckerCoreCLI" --configuration Release --output "../../ci-tools" - name: download-last-nuget-release-common image: plugins/download settings: source: https://www.nuget.org/api/v2/package/Jellyfin.Common - destination: Jellyfin.Common.nupkg - when: - event: - - pull_request + destination: ci/Jellyfin.Common.nupkg - name: download-last-nuget-release-model image: plugins/download settings: source: https://www.nuget.org/api/v2/package/Jellyfin.Model - destination: Jellyfin.Model.nupkg - when: - event: - - pull_request + destination: ci/Jellyfin.Model.nupkg - name: download-last-nuget-release-controller image: plugins/download settings: source: https://www.nuget.org/api/v2/package/Jellyfin.Controller - destination: Jellyfin.Controller.nupkg - when: - event: - - pull_request + destination: ci/Jellyfin.Controller.nupkg - name: download-last-nuget-release-naming image: plugins/download settings: source: https://www.nuget.org/api/v2/package/Jellyfin.Naming - destination: Jellyfin.Naming.nupkg - when: - event: - - pull_request + destination: ci/Jellyfin.Naming.nupkg - name: extract-downloaded-nuget-packages image: garthk/unzip commands: - - unzip -j Jellyfin.Common.nupkg "*.dll" -d /current-release - - unzip -j Jellyfin.Model.nupkg "*.dll" -d /current-release - - unzip -j Jellyfin.Controller.nupkg "*.dll" -d /current-release - - unzip -j Jellyfin.Naming.nupkg "*.dll" -d /current-release - when: - event: - - pull_request + - unzip -j ci/Jellyfin.Common.nupkg "*.dll" -d ci/nuget-packages + - unzip -j ci/Jellyfin.Model.nupkg "*.dll" -d ci/nuget-packages + - unzip -j ci/Jellyfin.Controller.nupkg "*.dll" -d ci/nuget-packages + - unzip -j ci/Jellyfin.Naming.nupkg "*.dll" -d ci/nuget-packages - name: run-dotnet-compat-common - image: debian:stretch + image: microsoft/dotnet:2-runtime err_ignore: true commands: - - /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Common.dll /release/Jellyfin.Common.dll - when: - event: - - pull_request + - dotnet ci/ci-tools/CompatibilityCheckerCoreCLI.dll ci/nuget-packages/Jellyfin.Common.dll ci/ci-release/Jellyfin.Common.dll - name: run-dotnet-compat-model - image: debian:stretch + image: microsoft/dotnet:2-runtime err_ignore: true commands: - - /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Model.dll /release/Jellyfin.Model.dll - when: - event: - - pull_request + - dotnet ci/ci-tools/CompatibilityCheckerCoreCLI.dll ci/nuget-packages/Jellyfin.Model.dll ci/ci-release/Jellyfin.Model.dll - name: run-dotnet-compat-controller - image: debian:stretch + image: microsoft/dotnet:2-runtime err_ignore: true commands: - - /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Controller.dll /release/Jellyfin.Controller.dll - when: - event: - - pull_request + - dotnet ci/ci-tools/CompatibilityCheckerCoreCLI.dll ci/nuget-packages/Jellyfin.Controller.dll ci/ci-release/Jellyfin.Controller.dll - name: run-dotnet-compat-naming - image: debian:stretch + image: microsoft/dotnet:2-runtime err_ignore: true commands: - - /tools/CompatibilityCheckerCoreCLI /current-release/Jellyfin.Naming.dll /release/Jellyfin.Naming.dll - when: - event: - - pull_request + - dotnet ci/ci-tools/CompatibilityCheckerCoreCLI.dll ci/nuget-packages/Jellyfin.Naming.dll ci/ci-release/Jellyfin.Naming.dll diff --git a/.gitignore b/.gitignore index aef6662727..65e47747ee 100644 --- a/.gitignore +++ b/.gitignore @@ -264,3 +264,5 @@ deployment/**/pkg-dist-tmp/ deployment/collect-dist/ jellyfin_version.ini + +ci/ From 3f878d63a5ffd878cf37c3086a2a4a7b3bd8a891 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Tue, 12 Feb 2019 22:44:01 +0100 Subject: [PATCH 5/5] Added Debug build and seperate the check-abi pipeline. --- .drone.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index f1212d3f96..972bf36f3a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,5 +1,37 @@ +--- kind: pipeline -name: build +name: build-debug + +steps: +- name: submodules + image: docker:git + commands: + - git submodule update --init --recursive + +- name: build + image: microsoft/dotnet:2-sdk + commands: + - dotnet publish "Jellyfin.Server" --configuration Debug --output "../ci/ci-debug" + +--- +kind: pipeline +name: build-release + +steps: +- name: submodules + image: docker:git + commands: + - git submodule update --init --recursive + +- name: build + image: microsoft/dotnet:2-sdk + commands: + - dotnet publish "Jellyfin.Server" --configuration Release --output "../ci/ci-release" + +--- + +kind: pipeline +name: check-abi steps: - name: submodules