mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-02 08:25:55 +00:00
install python if not installed (ubuntu/self-hosted)
This commit is contained in:
@@ -18,10 +18,11 @@ runs:
|
|||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- name: Get commit message and set environment variable
|
- name: Get commit message and set environment variable
|
||||||
shell: python
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
run: |
|
run: |
|
||||||
|
python3 - << 'PY'
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import secrets
|
import secrets
|
||||||
@@ -72,3 +73,4 @@ runs:
|
|||||||
|
|
||||||
print(f"✓ XAHAU_GA_COMMIT_MSG set (available to all subsequent steps)")
|
print(f"✓ XAHAU_GA_COMMIT_MSG set (available to all subsequent steps)")
|
||||||
print("==========================================")
|
print("==========================================")
|
||||||
|
PY
|
||||||
|
|||||||
15
.github/workflows/xahau-ga-nix.yml
vendored
15
.github/workflows/xahau-ga-nix.yml
vendored
@@ -182,6 +182,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install python if not installed
|
||||||
|
run: |
|
||||||
|
if ! which python3 > /dev/null 2>&1; then
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y python3 python-is-python3
|
||||||
|
fi
|
||||||
|
if ! which pip3 > /dev/null 2>&1; then
|
||||||
|
sudo apt-get install -y python3-pip
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Get commit message
|
- name: Get commit message
|
||||||
id: get-commit-message
|
id: get-commit-message
|
||||||
@@ -194,6 +204,9 @@ jobs:
|
|||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
sudo apt install software-properties-common
|
||||||
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||||
|
sudo apt update
|
||||||
sudo apt-get install -y ninja-build ${{ matrix.cc }} ${{ matrix.cxx }} ccache
|
sudo apt-get install -y ninja-build ${{ matrix.cc }} ${{ matrix.cxx }} ccache
|
||||||
|
|
||||||
# Install the specific GCC version needed for Clang
|
# Install the specific GCC version needed for Clang
|
||||||
@@ -258,7 +271,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install Conan 2
|
# Install Conan 2
|
||||||
pip install --upgrade "conan>=2.0,<3"
|
pip3 install --upgrade "conan>=2.0,<3"
|
||||||
|
|
||||||
- name: Check environment
|
- name: Check environment
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user