Proof of Conan #1121
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: Proof of Conan | |
on: | |
workflow_dispatch: | |
inputs: | |
repository: | |
required: true | |
description: 'x' | |
ref: | |
required: true | |
description: 'x' | |
path: | |
required: true | |
description: 'x' | |
targets: | |
required: true | |
description: 'JSON of all your targets' | |
permissions: | |
contents: read | |
jobs: | |
checkout: | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
echo "Building Conan Package" >> $GITHUB_STEP_SUMMARY | |
echo "- repo: ${{ github.event.inputs.repository }}" >> $GITHUB_STEP_SUMMARY | |
echo "- gitref: ${{ github.event.inputs.ref }}" >> $GITHUB_STEP_SUMMARY | |
echo "- path: ${{ github.event.inputs.path }}" >> $GITHUB_STEP_SUMMARY | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.event.inputs.repository }} | |
ref: ${{ github.event.inputs.ref }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: repo | |
path: ${{ github.event.inputs.path }} | |
_: | |
runs-on: ${{ matrix.os }} | |
needs: checkout | |
strategy: | |
matrix: ${{fromJson(github.event.inputs.targets)}} | |
continue-on-error: true | |
env: | |
NOT_ON_C3I: 1 | |
CONAN_CMD: ${{ matrix.conancmd }} | |
CONTAINER: ${{ matrix.container }} | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: repo | |
path: repo | |
- run: du -a | |
shell: bash | |
- run: mv repo/${{ matrix.path }}/* . | |
shell: bash | |
- uses: actions/checkout@v4 | |
with: | |
path: proof-of-conan | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.8" | |
cache: 'pip' | |
cache-dependency-path: 'proof-of-conan/requirements.txt' | |
- run: pip3 install -r proof-of-conan/requirements.txt | |
- name: set conan home | |
if: ${{ runner.os == 'Windows' }} | |
shell: bash | |
run: echo "CONAN_HOME=${{ runner.temp }}\\.c2" >> $GITHUB_ENV | |
- run: conan profile detect --force | |
shell: bash | |
if: ${{ matrix.container == '' }} | |
- run: conan install --requires=${{ matrix.toolchain }} -g virtualenv | |
if: ${{ matrix.toolchain != '' && matrix.container == '' }} | |
- run: | | |
du -a | |
if test -f activate.sh; then | |
echo "ACTIVATE!" | |
source activate.sh | |
fi | |
which g++ | |
conan $CONAN_CMD -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True | |
name: conan ${{ matrix.conancmd }} | |
shell: bash | |
if: ${{ matrix.container == '' }} | |
env: | |
CONAN_SYSREQUIRES_MODE: enabled | |
# Must be root? How else to use /build, and can't use ~ since we don't know the user | |
- run: docker run --rm -i -e CONAN_SYSREQUIRES_MODE=enabled -v "$PWD:/build" -u root -w /build "$CONTAINER" conan $CONAN_CMD -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True | |
if: ${{ matrix.container != '' }} |