diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 33cf743..9bf2d8a 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -17,50 +17,31 @@ 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: "10.0.0" - go_version: "1.22" - - version: "11.0.1" - go_version: "1.22" - - version: "null" - go_version: "1.22" + - "0.1.0" + - "0.3.2" + - "0.3.3" + - "0.3.4" + - "0.3.7" + - "0.3.8" + - "0.3.9" + - "1.0.0" + - "2.0.0" + - "3.0.0" + - "3.1.0" + - "4.0.0" + - "5.0.0" + - "6.0.0" + - "7.0.0" + - "8.0.0" + - "8.0.1" + - "9.0.0" + - "9.0.1" + - "10.0.0" + - "11.0.1" + - "null" + + env: + GOVERSION: 1.23 steps: - name: Checkout repository @@ -73,33 +54,30 @@ jobs: - name: Set up Go 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 }} + brew install go@${{ env.GOVERSION }} + if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then + sudo ln -fs $(brew --prefix go@${{ env.GOVERSION }})/libexec/bin/go /usr/bin/go + else + sudo ln -fs $(brew --prefix go@${{ env.GOVERSION }}) $(brew --prefix)/opt/go + fi - name: Install Xiond run: | echo "Matrix OS: ${{ matrix.os }}" - echo "Matrix version: ${{ matrix.version.version }}" - echo "Matrix go version: ${{ matrix.version.go_version }}" + echo "Matrix version: ${{ matrix.version }}" + echo "Matrix go version: ${{ env.GOVERSION }}" 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 + if [[ "${{ matrix.version }}" == "null" ]]; then echo "Installing latest version of xiond" brew install xiond else - echo "Installing xiond version ${{ matrix.version.version }}" - brew install xiond@${{ matrix.version.version }} + echo "Installing xiond version ${{ matrix.version }}" + brew install xiond@${{ matrix.version }} fi xiond version --long 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