Skip to content

Commit

Permalink
change workflow to pick libc
Browse files Browse the repository at this point in the history
  • Loading branch information
augustbleeds committed Sep 30, 2024
1 parent bbf35bc commit 46ea21b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 21 deletions.
8 changes: 4 additions & 4 deletions .github/actions/build-test-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ inputs:
runs:
using: composite
steps:
- name: Install Cairo
uses: ./.github/actions/install-cairo
with:
use_musl_libc: "true"
- name: Check if image exists
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19
Expand All @@ -30,10 +34,6 @@ runs:
tag: ${{ inputs.tag }}
AWS_REGION: ${{ inputs.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }}
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Cairo
uses: ./.github/actions/install-cairo
- name: Build and Publish Test Runner
if: steps.check-image.outputs.exists == 'false'
uses: smartcontractkit/chainlink-github-actions/docker/build-push@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19
Expand Down
43 changes: 26 additions & 17 deletions .github/actions/install-cairo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,43 @@ name: Install Cairo and Scarb
description: A composite action that installs cairo and scarb binaries

inputs:
cairo_version:
description: Cairo release version
default: "v2.8.2"
required: false
# cairo_version:
# description: Cairo release version
# default: "v2.8.2"
# required: false
scarb_version:
description: Scarb release version
default: "v2.8.2"
required: false
use_musl_libc:
description: "C library implementation"
default: "false"
required: false

runs:
using: composite
steps:
- name: Setup Cairo for Linux
id: install-cairo
shell: bash
run: |
wget https://github.com/starkware-libs/cairo/releases/download/${{ inputs.cairo_version }}/release-x86_64-unknown-linux-musl.tar.gz
tar -xvzf release-x86_64-unknown-linux-musl.tar.gz
mv -vf cairo cairo-build
echo "$GITHUB_WORKSPACE/cairo-build/bin" >> $GITHUB_PATH
echo "$GITHUB_WORKSPACE"
echo "this is the github workspace"
# - name: Setup Cairo for Linux
# id: install-cairo
# shell: bash
# run: |
# wget https://github.com/starkware-libs/cairo/releases/download/${{ inputs.cairo_version }}/release-x86_64-unknown-linux-musl.tar.gz
# tar -xvzf release-x86_64-unknown-linux-musl.tar.gz
# mv -vf cairo cairo-build
# echo "$GITHUB_WORKSPACE/cairo-build/bin" >> $GITHUB_PATH
# echo "$GITHUB_WORKSPACE"
# echo "this is the github workspace"

- name: Setup Scarb for Linux
id: install-scarb
shell: bash
run: |
wget https://github.com/software-mansion/scarb/releases/download/${{ inputs.scarb_version }}/scarb-${{ inputs.scarb_version }}-x86_64-unknown-linux-gnu.tar.gz
tar -xvzf scarb-${{ inputs.scarb_version }}-x86_64-unknown-linux-gnu.tar.gz
mv -vf scarb-${{ inputs.scarb_version }}-x86_64-unknown-linux-gnu scarb-build
if [ "${{ inputs.use_musl_libc }}" = "true" ]; then
libc_version="musl"
else
libc_version="gnu"
fi
wget https://github.com/software-mansion/scarb/releases/download/${{ inputs.scarb_version }}/scarb-${{ inputs.scarb_version }}-x86_64-unknown-linux-${libc_version}.tar.gz
tar -xvzf scarb-${{ inputs.scarb_version }}-x86_64-unknown-linux-${libc_version}.tar.gz
mv -vf scarb-${{ inputs.scarb_version }}-x86_64-unknown-linux-${libc_version} scarb-build
echo "$GITHUB_WORKSPACE/scarb-build/bin" >> $GITHUB_PATH

0 comments on commit 46ea21b

Please sign in to comment.