Generate Conan Packages Info #539
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Conan Packages Info | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
gen_packages_info: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gcc g++ make cmake pkg-config | |
python -m pip install --upgrade pip | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
path: clion-plugin | |
- name: Configure Conan | |
run: | | |
pip install conan --upgrade | |
conan --version | |
pip install -r clion-plugin/.ci/requirements.txt | |
conan profile detect | |
- name: Run the script | |
run: | | |
git clone https://github.com/conan-io/conan-center-index tmp/conan-center-index | |
cd clion-plugin/.ci | |
python crawl.py ../../tmp/conan-center-index/recipes ../src/main/resources/conan/targets-data.json ../src/main/resources/conan/targets-data.json | |
git config --local user.email "[email protected]" | |
git config --local user.name "$GITHUB_ACTOR" | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git | |
git add ../src/main/resources/conan/targets-data.json | |
if git diff-index --quiet HEAD --; then | |
echo "No changes to commit" | |
else | |
git commit -m "update targets-data.json" | |
git push origin develop2 | |
fi |