Skip to content

Commit

Permalink
use same go version
Browse files Browse the repository at this point in the history
  • Loading branch information
2xburnt committed Oct 1, 2024
1 parent a31b5e7 commit 314afe2
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 59 deletions.
94 changes: 36 additions & 58 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
5 changes: 5 additions & 0 deletions Formula/xiond.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require_relative "../lib/base"

class Xiond < XiondBase
init "11.0.1", "82c599c27afb7d1fc0e017c9453ce923c3590991d31de06f673a69a7a05ae695"
end
3 changes: 2 additions & 1 deletion lib/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 314afe2

Please sign in to comment.