Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ on:

jobs:
cancel-previous-runs:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

build_linux-x64-musl:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -32,7 +32,7 @@ jobs:
node-version: '16'
- uses: Swatinem/rust-cache@v2
- name: Download x86_64-linux-musl-cross toolchain
run: curl -O -C - https://musl.cc/x86_64-linux-musl-cross.tgz
run: curl -O -L -C - https://github.com/musl-cc/musl.cc/releases/download/v0.0.1/x86_64-linux-musl-cross.tgz
- name: Install x86_64-linux-musl-cross toolchain
run: tar xf x86_64-linux-musl-cross.tgz
- name: Configure linux-x64-musl cross compile
Expand All @@ -49,14 +49,14 @@ jobs:
run: npm i
- name: Build
run: npm run build:cargo
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: linux-x64-musl
path: native/linux-x64-musl.node
if-no-files-found: error

build_linux-arm64-musl:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -67,7 +67,7 @@ jobs:
node-version: '16'
- uses: Swatinem/rust-cache@v2
- name: Download aarch64-linux-musl-cross toolchain
run: curl -O -C - https://musl.cc/aarch64-linux-musl-cross.tgz
run: curl -O -L -C - https://github.com/musl-cc/musl.cc/releases/download/v0.0.1/aarch64-linux-musl-cross.tgz
- name: Install aarch64-linux-musl-cross toolchain
run: tar xf aarch64-linux-musl-cross.tgz
- name: Configure linux-arm64-musl cross compile
Expand All @@ -84,14 +84,14 @@ jobs:
run: npm i
- name: Build
run: npm run build:cargo
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: linux-arm64-musl
path: native/linux-arm64-musl.node
if-no-files-found: error

build_linux-x64-glibc:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container:
image: rust:buster
steps:
Expand All @@ -107,14 +107,14 @@ jobs:
run: npm i
- name: Build
run: npm run build:cargo
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: linux-x64-glibc
path: native/linux-x64-glibc.node
if-no-files-found: error

build_linux-arm64-glibc:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container:
image: rust:buster
steps:
Expand All @@ -141,7 +141,7 @@ jobs:
run: npm i
- name: Build
run: npm run build:cargo
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: linux-arm64-glibc
path: native/linux-arm64-glibc.node
Expand All @@ -162,7 +162,7 @@ jobs:
run: npm i
- name: Build
run: npm run build:cargo
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: win32-x64
path: native/win32-x64.node
Expand All @@ -184,7 +184,7 @@ jobs:
run: npm i
- name: Build
run: npm run build:cargo
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: darwin-x64
path: native/darwin-x64.node
Expand All @@ -210,19 +210,19 @@ jobs:
run: npm i
- name: Build
run: npm run build:cargo
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: darwin-arm64
path: native/darwin-arm64.node
if-no-files-found: error

test_linux-arm64-glibc:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs:
- build_linux-arm64-glibc
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: linux-arm64-glibc
path: native
Expand All @@ -244,12 +244,12 @@ jobs:
npm run test:js

test_linux-arm64-musl:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs:
- build_linux-arm64-musl
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: linux-arm64-musl
path: native
Expand All @@ -269,14 +269,14 @@ jobs:
npm run test:js

test_linux-x64-glibc:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container:
image: node:16-bullseye
needs:
- build_linux-x64-glibc
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: linux-x64-glibc
path: native
Expand All @@ -291,14 +291,14 @@ jobs:
run: npm i && npm test

test_linux-x64-musl:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container:
image: node:16-alpine
needs:
- build_linux-x64-musl
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: linux-x64-musl
path: native
Expand All @@ -318,7 +318,7 @@ jobs:
- build_win-x64
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: win32-x64
path: native
Expand All @@ -339,7 +339,7 @@ jobs:
- build_darwin-x64
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: darwin-x64
path: native
Expand All @@ -354,12 +354,12 @@ jobs:
run: npm i && npm test

npm-package:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs:
- build_linux-x64-musl
- build_linux-arm64-musl
- build_linux-x64-glibc
- build_linux-arm64-glibc
# - build_linux-arm64-glibc
- build_win-x64
- build_darwin-arm64
env:
Expand All @@ -372,7 +372,7 @@ jobs:
node-version: '16'
registry-url: https://registry.npmjs.org
always-auth: true
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: native
- name: Position downloaded artifacts
Expand All @@ -391,7 +391,7 @@ jobs:
run: |
npm pack
mv "stacks-encoding-native-js-$NPM_PACKAGE_VERSION.tgz" "stacks-encoding-native-js.tgz"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: stacks-encoding-native-js.tgz
path: stacks-encoding-native-js.tgz
Expand Down
2 changes: 2 additions & 0 deletions src/stacks_tx/deserialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ impl ClarityVersion {
x if x == ClarityVersion::Clarity1 as u8 => Some(ClarityVersion::Clarity1),
x if x == ClarityVersion::Clarity2 as u8 => Some(ClarityVersion::Clarity2),
x if x == ClarityVersion::Clarity3 as u8 => Some(ClarityVersion::Clarity3),
x if x == ClarityVersion::Clarity4 as u8 => Some(ClarityVersion::Clarity4),
_ => None,
}
}
Expand Down Expand Up @@ -681,6 +682,7 @@ pub enum ClarityVersion {
Clarity1 = 1,
Clarity2 = 2,
Clarity3 = 3,
Clarity4 = 4,
}

#[repr(u8)]
Expand Down
Loading