diff --git a/.github/actions/setup-smplx/action.yml b/.github/actions/setup-smplx/action.yml deleted file mode 100644 index 5b2eff4..0000000 --- a/.github/actions/setup-smplx/action.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: setup-smplx - -inputs: - commit-sha: - description: "Commit in repository to use" - required: false - default: "master" - owner-repo: - description: "Owner repo on Github to use" - required: false - default: "BlockstreamResearch/smplx" - -runs: - using: composite - steps: - - name: Install smplx-cli via simplexup - shell: bash - run: | - set -euo pipefail - REVISION="${{ inputs.commit-sha }}" - OWNER_REPO="${{ inputs.owner-repo }}" - bash "$GITHUB_WORKSPACE/.github/scripts/setup-smplx" "${REVISION}" "${OWNER_REPO}" diff --git a/.github/scripts/setup-smplx b/.github/scripts/setup-smplx deleted file mode 100644 index 0cfc330..0000000 --- a/.github/scripts/setup-smplx +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -say() { - printf "setup-smplx: %s\n" "$1" -} - -err() { - say "$1" >&2 - exit 1 -} - -main() { - # Parse and validate arguments - COMMIT_SHA="${1:-}" - OWNER_REPO="${2:-}" - FETCH_REF="${COMMIT_SHA:-master}" - FILE_PATH="simplexup/install" - - if [ "$#" -lt 2 ]; then - err "Usage: setup-smplx " - fi - - if [ -z "$OWNER_REPO" ]; then - err "no OWNER_REPO variable set" - fi - - # Download and execute the initial install script - RAW_URL="https://raw.githubusercontent.com/${OWNER_REPO}/${FETCH_REF}/${FILE_PATH}" - say "Fetching ${FILE_PATH} from ${RAW_URL}" - - curl -fsSL --retry 5 --retry-all-errors --retry-delay 2 "${RAW_URL}" | bash - - # Download the simplexup executable - FILE_PATH="simplexup/simplexup" - RAW_URL="https://raw.githubusercontent.com/${OWNER_REPO}/${FETCH_REF}/${FILE_PATH}" - - BASE_DIR="${XDG_CONFIG_HOME:-$HOME}" - SIMPLEX_DIR="${SIMPLEX_DIR:-$BASE_DIR/.simplex}" - SIMPLEX_BIN_DIR="$SIMPLEX_DIR/bin" - BIN_PATH="$SIMPLEX_BIN_DIR/simplexup" - - # Ensure bin directory exists and download simplexup into it - mkdir -p "$SIMPLEX_BIN_DIR" - say "Fetching ${FILE_PATH} from ${RAW_URL}" - - curl -fsSL --retry 5 --retry-all-errors --retry-delay 2 "${RAW_URL}" -o "$BIN_PATH" - chmod +x "$BIN_PATH" - - # Execute simplexup, using a specific commit if provided (and not master's default release) - if [ "$FETCH_REF" != "master" ]; then - say "Using simplexup and simplex from commit: ${FETCH_REF}" - "$BIN_PATH" --commit "${FETCH_REF}" - else - say "Using simplexup from master branch and installing latest simplex" - "$BIN_PATH" - fi - - # Add the Simplex binary directory to GitHub Actions PATH - echo "$SIMPLEX_BIN_DIR" >> "$GITHUB_PATH" - - # Verify installation - say "Verifying simplex installation..." - "${SIMPLEX_BIN_DIR}/simplex" --version -} - -main "$@" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 209790a..da161af 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,7 +45,9 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Install simplex-cli - uses: ./.github/actions/setup-smplx + uses: BlockstreamResearch/simplicityhl-toolchain@v0.0.2 + with: + components: simplex - name: Generate contract artifacts shell: bash