From 7b84e9dcd5394fbeb79c0be0e744239bf8fb47a2 Mon Sep 17 00:00:00 2001 From: Ash <96692350+ash-burnt@users.noreply.github.com> Date: Fri, 27 Sep 2024 13:36:02 -0700 Subject: [PATCH] Add versions 10 and 11 (#5) * change symlink * update numbers * quotes * more version * stupid linter * typo * fix wasmvm dwonload * add 9.0.1 and 11.0.1, remove 11.0.0 * do not fail fast * update default --------- Co-authored-by: 2xburnt <169301814+2xburnt@users.noreply.github.com> --- .github/workflows/install.yml | 53 ++++++++++++++++++----------------- Aliases/xiond | 6 +++- Formula/xiond@10.0.0.rb | 5 ++++ Formula/xiond@11.0.1.rb | 5 ++++ Formula/xiond@9.0.1.rb | 5 ++++ lib/base.rb | 16 +++++------ 6 files changed, 54 insertions(+), 36 deletions(-) mode change 120000 => 100644 Aliases/xiond create mode 100644 Formula/xiond@10.0.0.rb create mode 100644 Formula/xiond@11.0.1.rb create mode 100644 Formula/xiond@9.0.1.rb diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 02ab937..896777c 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -13,35 +13,36 @@ jobs: install: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [macos-latest, ubuntu-latest] version: - - 'null' - - '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' + - "null" + - "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" steps: - name: Checkout repository uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - submodules: 'recursive' - name: Set up Homebrew (macOS) if: matrix.os == 'macos-latest' @@ -62,13 +63,13 @@ jobs: export LEDGER_ENABLED=false echo "PATH: $PATH" fi - + brew tap burnt-labs/xion brew install go - + echo "Matrix OS: ${{ matrix.os }}" echo "Matrix version: ${{ matrix.version }}" - + if [[ "${{ matrix.version }}" == "null" ]]; then echo "Installing latest version of xiond" brew install xiond @@ -76,5 +77,5 @@ jobs: echo "Installing xiond version ${{ matrix.version }}" brew install xiond@${{ matrix.version }} fi - + xiond version --long diff --git a/Aliases/xiond b/Aliases/xiond deleted file mode 120000 index 7e9aac2..0000000 --- a/Aliases/xiond +++ /dev/null @@ -1 +0,0 @@ -../Formula/xiond@9.0.0.rb \ No newline at end of file diff --git a/Aliases/xiond b/Aliases/xiond new file mode 100644 index 0000000..56ba68b --- /dev/null +++ b/Aliases/xiond @@ -0,0 +1,5 @@ +require_relative "../lib/base" + +class XiondAT1101 < XiondBase + init "11.0.1", "82c599c27afb7d1fc0e017c9453ce923c3590991d31de06f673a69a7a05ae695" +end diff --git a/Formula/xiond@10.0.0.rb b/Formula/xiond@10.0.0.rb new file mode 100644 index 0000000..4a0a4a7 --- /dev/null +++ b/Formula/xiond@10.0.0.rb @@ -0,0 +1,5 @@ +require_relative "../lib/base" + +class XiondAT1000 < XiondBase + init "10.0.0", "69778166e6b9fb7373891e0d6b98b5f2a6b61b6156e5008cdd09a4a3c9ab6c65" +end diff --git a/Formula/xiond@11.0.1.rb b/Formula/xiond@11.0.1.rb new file mode 100644 index 0000000..56ba68b --- /dev/null +++ b/Formula/xiond@11.0.1.rb @@ -0,0 +1,5 @@ +require_relative "../lib/base" + +class XiondAT1101 < XiondBase + init "11.0.1", "82c599c27afb7d1fc0e017c9453ce923c3590991d31de06f673a69a7a05ae695" +end diff --git a/Formula/xiond@9.0.1.rb b/Formula/xiond@9.0.1.rb new file mode 100644 index 0000000..7307aac --- /dev/null +++ b/Formula/xiond@9.0.1.rb @@ -0,0 +1,5 @@ +require_relative "../lib/base" + +class XiondAT901 < XiondBase + init "9.0.1", "208b6e9f0b0c4ea5da8417d94579d78ab9ce09938f63e2932db4a44fdd7baed8" +end diff --git a/lib/base.rb b/lib/base.rb index 7945d12..365da2b 100644 --- a/lib/base.rb +++ b/lib/base.rb @@ -47,7 +47,7 @@ def setup_go_environment end def fetch_and_verify_libwasmvm - wasm_version = `go list -m -f '{{.Version}}' github.com/CosmWasm/wasmvm`.strip + wasm_version = `go list -m $(grep "github.com/CosmWasm/wasmvm" go.mod | cut -d " " -f 1) | cut -d " " -f 2`.strip libwasmvm_suffix = determine_libwasmvm_suffix libwasmvm_url = "https://github.com/CosmWasm/wasmvm/releases/download/#{wasm_version}/libwasmvm.#{libwasmvm_suffix}" libwasmvm_file = "#{buildpath}/libwasmvm.#{libwasmvm_suffix}" @@ -110,14 +110,12 @@ def determine_libwasmvm_suffix else raise "Unsupported architecture: #{Hardware::CPU.arch}" end + elsif Hardware::CPU.intel? + "x86_64.so" + elsif Hardware::CPU.arm? + "aarch64.so" else - if Hardware::CPU.intel? - "x86_64.so" - elsif Hardware::CPU.arm? - "aarch64.so" - else - raise "Unsupported architecture: #{Hardware::CPU.arch}" - end + raise "Unsupported architecture: #{Hardware::CPU.arch}" end else raise "Unsupported OS: #{OS::NAME}" @@ -125,7 +123,7 @@ def determine_libwasmvm_suffix end def alpine_linux? - File.exist?('/etc/alpine-release') + File.exist?("/etc/alpine-release") end test do