mirror of
				https://github.com/XRPLF/clio.git
				synced 2025-11-04 03:45:50 +00:00 
			
		
		
		
	I started with really simple pre-commit hooks and will add more on top. Important files: - `.pre-commit-config.yaml` - the config for pre-commit - `.github/workflows/pre-commit.yml` - runs pre-commit hooks in branches and `develop` - `.github/workflows/pre-commit-autoupdate.yml` - autoupdates pre-commit hooks once in a month
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: Setup conan
 | 
						|
description: Setup conan profile and artifactory
 | 
						|
inputs:
 | 
						|
  conan_profile:
 | 
						|
    description: Conan profile name
 | 
						|
    required: true
 | 
						|
outputs:
 | 
						|
  conan_profile:
 | 
						|
    description: Created conan profile name
 | 
						|
    value: ${{ steps.conan_export_output.outputs.conan_profile }}
 | 
						|
runs:
 | 
						|
  using: composite
 | 
						|
  steps:
 | 
						|
    - name: On mac
 | 
						|
      if: ${{ runner.os == 'macOS' }}
 | 
						|
      shell: bash
 | 
						|
      env:
 | 
						|
        CONAN_PROFILE: apple_clang_16
 | 
						|
      id: conan_setup_mac
 | 
						|
      run: |
 | 
						|
        echo "Creating $CONAN_PROFILE conan profile"
 | 
						|
        conan profile new $CONAN_PROFILE --detect --force
 | 
						|
        conan profile update settings.compiler.libcxx=libc++ $CONAN_PROFILE
 | 
						|
        conan profile update settings.compiler.cppstd=20 $CONAN_PROFILE
 | 
						|
        conan profile update env.CXXFLAGS=-DBOOST_ASIO_DISABLE_CONCEPTS $CONAN_PROFILE
 | 
						|
        conan profile update "conf.tools.build:cxxflags+=[\"-DBOOST_ASIO_DISABLE_CONCEPTS\"]" $CONAN_PROFILE
 | 
						|
        echo "created_conan_profile=$CONAN_PROFILE" >> $GITHUB_OUTPUT
 | 
						|
 | 
						|
    - name: On linux
 | 
						|
      if: ${{ runner.os == 'Linux' }}
 | 
						|
      shell: bash
 | 
						|
      id: conan_setup_linux
 | 
						|
      run: |
 | 
						|
        echo "created_conan_profile=${{ inputs.conan_profile }}" >> $GITHUB_OUTPUT
 | 
						|
 | 
						|
    - name: Export output variable
 | 
						|
      shell: bash
 | 
						|
      id: conan_export_output
 | 
						|
      run: |
 | 
						|
        echo "conan_profile=${{ steps.conan_setup_mac.outputs.created_conan_profile || steps.conan_setup_linux.outputs.created_conan_profile }}" >> $GITHUB_OUTPUT
 | 
						|
 | 
						|
    - name: Add conan-non-prod artifactory
 | 
						|
      shell: bash
 | 
						|
      run: |
 | 
						|
        if [[ -z $(conan remote list | grep conan-non-prod) ]]; then
 | 
						|
            echo "Adding conan-non-prod"
 | 
						|
            conan remote add --insert 0 conan-non-prod http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
 | 
						|
        else
 | 
						|
            echo "Conan-non-prod is available"
 | 
						|
        fi
 |