Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor CI to work with Ubuntu 20.04 machines #133

Merged
merged 6 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .azure/common-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
parameters:
pythonVersion: ''

steps:
- task: DownloadSecureFile@1
name: privateKey
displayName: 'Download SSH private key'
inputs:
secureFile: 'id_rsa-azure'

- task: InstallSSHKey@0
displayName: 'Install SSH key'
inputs:
knownHostsEntry: "|1|5qWKb7xAKkWXfLw6ZdNAs9FzKNA=|A+W82x1iZWz+nXHgPdlIQmsEOsU= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=="
sshKeySecureFile: 'id_rsa-azure'

- script: |
git config --global user.name "Garrett Brown"
git config --global user.email "[email protected]"
displayName: 'Set Git authorship'

- script: |
git clone --branch retroplayer-21 --depth=1 https://github.com/garbear/xbmc.git kodi
displayName: 'Clone Kodi'

- task: UsePythonVersion@0
inputs:
versionSpec: ${{ parameters.pythonVersion }}

- script: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
displayName: 'Install Python requirements'
50 changes: 50 additions & 0 deletions .azure/job-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
parameters:
displayName: ''
vmImage: ''
pythonVersion: ''
dependsOn: ''
addons: []
installScript: ''

jobs:
- job: ${{ parameters.displayName }}
displayName: ${{ parameters.displayName }}
pool:
vmImage: ${{ parameters.vmImage }}
dependsOn: ${{ parameters.dependsOn }}
strategy:
matrix:
Python3:
python.version: ${{ parameters.pythonVersion }}
timeoutInMinutes: 0
steps:
- template: common-steps.yml
parameters:
pythonVersion: ${{ parameters.pythonVersion }}

# Optional dependency installation script
- script: |
sudo apt update
${{ parameters.installScript }}
displayName: 'Install system dependencies'
condition: ne('${{ parameters.installScript }}', '')

- template: azure-process-addon.yml
parameters:
addons: ${{ parameters.addons }}

- script: |
echo
echo "wiki.txt:"
echo
cat game-addons/wiki.txt || true
echo
displayName: 'Print wiki.txt'

- script: |
echo
echo "summary.html:"
echo
cat game-addons/summary.html || true
echo
displayName: 'Print summary.html'
Loading
Loading