Skip to content

Commit

Permalink
Merge pull request #133 from garbear/refactor-ci
Browse files Browse the repository at this point in the history
Refactor CI to work with Ubuntu 20.04 machines
  • Loading branch information
garbear authored Dec 15, 2024
2 parents f76902b + 18b00e1 commit c774ac7
Show file tree
Hide file tree
Showing 4 changed files with 331 additions and 269 deletions.
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

0 comments on commit c774ac7

Please sign in to comment.