mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-04 11:55:51 +00:00
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
name: Prepare runner
|
|
description: Install packages, set environment variables, create directories
|
|
inputs:
|
|
disable_ccache:
|
|
description: Whether ccache should be disabled
|
|
required: true
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Install packages on mac
|
|
if: ${{ runner.os == 'macOS' }}
|
|
shell: bash
|
|
run: |
|
|
brew install llvm@14 pkg-config ninja bison cmake ccache jq gh conan@1 ca-certificates
|
|
echo "/opt/homebrew/opt/conan@1/bin" >> $GITHUB_PATH
|
|
|
|
- name: Fix git permissions on Linux
|
|
if: ${{ runner.os == 'Linux' }}
|
|
shell: bash
|
|
run: git config --global --add safe.directory $PWD
|
|
|
|
- name: Set env variables for macOS
|
|
if: ${{ runner.os == 'macOS' }}
|
|
shell: bash
|
|
run: |
|
|
echo "CCACHE_DIR=${{ github.workspace }}/.ccache" >> $GITHUB_ENV
|
|
echo "CONAN_USER_HOME=${{ github.workspace }}" >> $GITHUB_ENV
|
|
|
|
- name: Set env variables for Linux
|
|
if: ${{ runner.os == 'Linux' }}
|
|
shell: bash
|
|
run: |
|
|
echo "CCACHE_DIR=/root/.ccache" >> $GITHUB_ENV
|
|
echo "CONAN_USER_HOME=/root/" >> $GITHUB_ENV
|
|
|
|
- name: Set CCACHE_DISABLE=1
|
|
if: ${{ inputs.disable_ccache == 'true' }}
|
|
shell: bash
|
|
run: |
|
|
echo "CCACHE_DISABLE=1" >> $GITHUB_ENV
|
|
|
|
- name: Create directories
|
|
shell: bash
|
|
run: |
|
|
mkdir -p $CCACHE_DIR
|
|
mkdir -p $CONAN_USER_HOME/.conan
|
|
|
|
|