From b7ef33fccb0394ecaa8310b0223cc104c2c41824 Mon Sep 17 00:00:00 2001 From: 2xburnt <169301814+2xburnt@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:53:42 -0500 Subject: [PATCH] remove brew install of go for ubuntu --- .github/workflows/install.yml | 89 +++++++++++++++++------------------ Formula/xiond.rb | 5 ++ lib/base.rb | 3 +- 3 files changed, 50 insertions(+), 47 deletions(-) create mode 100644 Formula/xiond.rb diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 33cf743..2c06872 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -17,44 +17,44 @@ jobs: matrix: os: [macos-latest, ubuntu-latest] version: - # - version: "0.1.0" - # go_version: "1.21" - # - version: "0.3.2" - # go_version: "1.21" - # - version: "0.3.3" - # go_version: "1.21" - # - version: "0.3.4" - # go_version: "1.21" - # - version: "0.3.7" - # go_version: "1.21" - # - version: "0.3.8" - # go_version: "1.21" - # - version: "0.3.9" - # go_version: "1.21" - # - version: "1.0.0" - # go_version: "1.21" - # - version: "2.0.0" - # go_version: "1.21" - # - version: "3.0.0" - # go_version: "1.21" - # - version: "3.1.0" - # go_version: "1.21" - # - version: "4.0.0" - # go_version: "1.21" - # - version: "5.0.0" - # go_version: "1.21" - # - version: "6.0.0" - # go_version: "1.21" - # - version: "7.0.0" - # go_version: "1.21" - # - version: "8.0.0" - # go_version: "1.21" - # - version: "8.0.1" - # go_version: "1.21" - # - version: "9.0.0" - # go_version: "1.21" - # - version: "9.0.1" - # go_version: "1.21" + - version: "0.1.0" + go_version: "1.21" + - version: "0.3.2" + go_version: "1.21" + - version: "0.3.3" + go_version: "1.21" + - version: "0.3.4" + go_version: "1.21" + - version: "0.3.7" + go_version: "1.21" + - version: "0.3.8" + go_version: "1.21" + - version: "0.3.9" + go_version: "1.21" + - version: "1.0.0" + go_version: "1.21" + - version: "2.0.0" + go_version: "1.21" + - version: "3.0.0" + go_version: "1.21" + - version: "3.1.0" + go_version: "1.21" + - version: "4.0.0" + go_version: "1.21" + - version: "5.0.0" + go_version: "1.21" + - version: "6.0.0" + go_version: "1.21" + - version: "7.0.0" + go_version: "1.21" + - version: "8.0.0" + go_version: "1.21" + - version: "8.0.1" + go_version: "1.21" + - version: "9.0.0" + go_version: "1.21" + - version: "9.0.1" + go_version: "1.21" - version: "10.0.0" go_version: "1.22" - version: "11.0.1" @@ -74,9 +74,11 @@ jobs: run: | export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH" brew install go@${{ matrix.version.go_version }} - cd $(brew --prefix go@${{ matrix.version.go_version }})/bin - brew unlink go || true - brew link -vv --force go@${{ matrix.version.go_version }} + if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then + sudo ln -fs $(brew --prefix go@${{ matrix.version.go_version }})/libexec/bin/go /usr/bin/go + else + sudo ln -fs $(brew --prefix go@${{ matrix.version.go_version }}) $(brew --prefix)/opt/go + fi - name: Install Xiond run: | @@ -86,14 +88,9 @@ jobs: if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH" - export LEDGER_ENABLED=false fi - export PATH="$(brew --prefix go@${{ matrix.version.go_version }})/libexec/bin/:$PATH" - echo "PATH: $PATH" - brew tap burnt-labs/xion - ls -la $(which go) if [[ "${{ matrix.version.version }}" == "null" ]]; then echo "Installing latest version of xiond" brew install xiond diff --git a/Formula/xiond.rb b/Formula/xiond.rb new file mode 100644 index 0000000..be80df5 --- /dev/null +++ b/Formula/xiond.rb @@ -0,0 +1,5 @@ +require_relative "../lib/base" + +class Xiond < XiondBase + init "11.0.1", "82c599c27afb7d1fc0e017c9453ce923c3590991d31de06f673a69a7a05ae695" +end diff --git a/lib/base.rb b/lib/base.rb index 3a673ef..b234e80 100644 --- a/lib/base.rb +++ b/lib/base.rb @@ -85,9 +85,10 @@ def install_libwasmvm end def compile_and_install_xiond + path = ENV["PATH"] ledger_enabled = ENV["LEDGER_ENABLED"] == "true" link_statically = ENV["LINK_STATICALLY"] == "true" - system "make", "install", "LEDGER_ENABLED=#{ledger_enabled}", "LINK_STATICALLY=#{link_statically}" + system "make", "install", "PATH=#{path}", "LEDGER_ENABLED=#{ledger_enabled}", "LINK_STATICALLY=#{link_statically}" bin.install "#{ENV.fetch("GOPATH", nil)}/bin/xiond" end