Bump actions/upload-artifact from 3 to 4 #284
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [ | |
1.63.0, | |
stable | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/[email protected] | |
- name: Install Rust ${{ matrix.rust }} | |
uses: actions-rs/[email protected] | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
profile: minimal | |
- name: Build | |
run: cargo build --verbose | |
test: | |
name: Test encode/decode | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install base58m | |
run: cargo install --force --path . | |
- name: Serialize hello world | |
run: | | |
res=$(echo -n "hello world" | base58m -) | |
if [ $res != "JTmsyNwG6XQ1fS9Z" ] | |
then | |
exit -1 | |
fi | |
- name: Deserialize hello world | |
run: | | |
res=$(echo -n "JTmsyNwG6XQ1fS9Z" | base58m -d -) | |
if [ $res != "hello world" ] | |
then | |
exit -1 | |
fi | |
test_check: | |
name: Test encode/decode (check mode) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install base58m | |
run: cargo install --force --path . | |
- name: Serialize hello world with check mode enable | |
run: | | |
res=$(echo -n "hello world" | base58m -c -) | |
if [ $res != "JTmsyNwG6XQ5LVkpe6Whi" ] | |
then | |
exit -1 | |
fi | |
- name: Deserialize hello world with check mode enable | |
run: | | |
res=$(echo -n "JTmsyNwG6XQ5LVkpe6Whi" | base58m -cd -) | |
if [ $res != "hello world" ] | |
then | |
exit -1 | |
fi |