diff --git a/.github/workflows/build-with-clang.yml b/.github/workflows/build-with-clang.yml deleted file mode 100644 index 7eda12c..0000000 --- a/.github/workflows/build-with-clang.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Build with clang - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Install llvm 16 - run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 16 && rm llvm.sh - - name: Install riscv64 target - run: rustup target add riscv64imac-unknown-none-elf - - name: Build - run: cargo build --verbose --target=riscv64imac-unknown-none-elf --features=build-with-clang diff --git a/.github/workflows/develop-clang.yml b/.github/workflows/develop-clang.yml new file mode 100644 index 0000000..19f97bf --- /dev/null +++ b/.github/workflows/develop-clang.yml @@ -0,0 +1,20 @@ +name: Develop Clang + +on: + pull_request: + push: + +jobs: + develop: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Deps + run: | + rustup target add riscv64imac-unknown-none-elf + wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 16 && rm llvm.sh + - name: Test + run: | + cargo build --verbose --target=riscv64imac-unknown-none-elf --features=build-with-clang diff --git a/.github/workflows/develop-rust.yml b/.github/workflows/develop-rust.yml new file mode 100644 index 0000000..570543f --- /dev/null +++ b/.github/workflows/develop-rust.yml @@ -0,0 +1,23 @@ +name: Develop Rust + +on: + pull_request: + push: + +jobs: + develop: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Deps + run: | + rustup target add riscv64imac-unknown-none-elf + cargo install cross --git https://github.com/cross-rs/cross --rev=6982b6c + cargo install ckb-capsule --git https://github.com/nervosnetwork/capsule --rev 5c1b2ce + - name: Test + run: | + cargo build --target=riscv64imac-unknown-none-elf --no-default-features --features=ckb-types,allocator + cross check --examples + make test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6d8d4f7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: Release + +on: + release: + types: [created] + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Deps + run: | + rustup target add riscv64imac-unknown-none-elf + - name: Push + run: | + cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }} + cargo publish diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 76eb030..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Rust - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: Checkout submodules - run: git submodule update --init --recursive - - name: Install Rust target - run: rustup target add riscv64imac-unknown-none-elf - - name: Install cross - run: cargo install cross --git https://github.com/cross-rs/cross --rev=6982b6c - - name: Build without riscv C compiler - run: cargo build --target=riscv64imac-unknown-none-elf --no-default-features --features=ckb-types,allocator - - name: Check example - run: cross check --examples - - name: Install capsule - run: cargo install ckb-capsule --git https://github.com/nervosnetwork/capsule --rev 5c1b2ce - - name: Run tests - run: make test diff --git a/Makefile b/Makefile index c0ca129..61dfd41 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ CC := riscv64-unknown-elf-gcc default: integration publish-crate: - cross publish -p ckb-standalone-types && cross publish -p ckb-std + cross publish -p ckb-std publish: publish-crate @@ -23,4 +23,3 @@ check: cross check --target ${TARGET} --examples .PHONY: test check -