|
44 | 44 | run: | |
45 | 45 | CARGO_VERSION=v$(grep "version" Cargo.toml | head -n 1 | cut -d\" -f2) |
46 | 46 | if [[ "${CARGO_VERSION}" != "${LATEST_RELEASE}" ]]; then |
47 | | - echo "::set-output name=TAG::${CARGO_VERSION}" |
| 47 | + echo "TAG=${CARGO_VERSION}" >> $GITHUB_OUTPUT |
48 | 48 | echo "::warning::Will create release for version: ${CARGO_VERSION}" |
49 | 49 | else |
50 | 50 | echo "::warning::Will not create a release" |
|
60 | 60 | uses: actions/checkout@v4 |
61 | 61 |
|
62 | 62 | - name: Install Rust toolchain |
63 | | - run: rustup toolchain install stable --profile minimal |
| 63 | + run: rustup toolchain install stable --profile minimal --component rustfmt,clippy |
64 | 64 |
|
65 | 65 | - name: Setup cache keys |
66 | 66 | shell: bash |
@@ -295,9 +295,9 @@ jobs: |
295 | 295 | id: variables |
296 | 296 | run: | |
297 | 297 | dir |
298 | | - echo "::set-output name=version::${GITHUB_REF#refs/tags/v}" |
299 | | - echo "::set-output name=KEYPAIR_NAME::gt-standard-keypair" |
300 | | - echo "::set-output name=CERTIFICATE_NAME::gt-certificate" |
| 298 | + echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT |
| 299 | + echo "KEYPAIR_NAME=gt-standard-keypair" >> $GITHUB_OUTPUT |
| 300 | + echo "CERTIFICATE_NAME=gt-certificate" >> $GITHUB_OUTPUT |
301 | 301 | echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV" |
302 | 302 | echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV" |
303 | 303 | echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV" |
@@ -386,147 +386,6 @@ jobs: |
386 | 386 | name: clarinet-${{ env.SHORT_TARGET_NAME }} |
387 | 387 | path: clarinet-${{ env.SHORT_TARGET_NAME }}.msi |
388 | 388 |
|
389 | | - dist_stacks_devnet_js: |
390 | | - name: Build Stacks Devnet JS Distributions |
391 | | - runs-on: ${{ matrix.os }} |
392 | | - needs: |
393 | | - - get_release_info |
394 | | - strategy: |
395 | | - fail-fast: false |
396 | | - matrix: |
397 | | - include: |
398 | | - - os: ubuntu-latest |
399 | | - platform: linux |
400 | | - target: x86_64-unknown-linux-gnu |
401 | | - architecture: x64 |
402 | | - libc: glibc |
403 | | - - os: windows-latest |
404 | | - platform: windows |
405 | | - target: x86_64-pc-windows-msvc |
406 | | - architecture: x64 |
407 | | - - os: macos-latest |
408 | | - platform: darwin |
409 | | - target: x86_64-apple-darwin |
410 | | - architecture: x64 |
411 | | - - os: macos-latest |
412 | | - platform: darwin |
413 | | - target: aarch64-apple-darwin |
414 | | - architecture: arm64 |
415 | | - - os: ubuntu-latest |
416 | | - platform: linux |
417 | | - target: x86_64-unknown-linux-musl |
418 | | - architecture: x64 |
419 | | - libc: musl |
420 | | - steps: |
421 | | - - name: Configure git to use LF (Windows) |
422 | | - if: matrix.os == 'windows-latest' |
423 | | - run: | |
424 | | - git config --global core.autocrlf false |
425 | | - git config --global core.eol lf |
426 | | -
|
427 | | - - name: Checkout repository |
428 | | - uses: actions/checkout@v4 |
429 | | - |
430 | | - - name: Install Rust toolchain |
431 | | - run: rustup toolchain install stable --profile minimal --target ${{ matrix.target }} |
432 | | - |
433 | | - - name: Setup cache keys |
434 | | - shell: bash |
435 | | - run: | |
436 | | - if [ "$RUNNER_OS" == "Windows" ]; then |
437 | | - RUST_VERSION=$(rustc -vV | sha256sum | cut -d ' ' -f1) |
438 | | - else |
439 | | - RUST_VERSION=$(rustc -vV | shasum -a 256 | cut -d ' ' -f1) |
440 | | - fi |
441 | | - echo "RUST_VERSION=$RUST_VERSION" >> $GITHUB_ENV |
442 | | -
|
443 | | - - name: Install and cache Node |
444 | | - if: matrix.target != 'x86_64-unknown-linux-musl' |
445 | | - uses: actions/setup-node@v4 |
446 | | - with: |
447 | | - node-version: "18" |
448 | | - # Host nodejs arch does not matter in our usecase for compiling cross-platform npm packages, |
449 | | - # if enabled, this will fail after installing an arm64 nodejs runtime for an x86_64 arch macos system |
450 | | - # architecture: ${{ matrix.architecture }} |
451 | | - cache: npm |
452 | | - cache-dependency-path: components/stacks-devnet-js/package-lock.json |
453 | | - |
454 | | - - name: Cache cargo |
455 | | - uses: actions/cache@v4 |
456 | | - with: |
457 | | - path: | |
458 | | - ~/.cargo/bin/ |
459 | | - ~/.cargo/registry/index/ |
460 | | - ~/.cargo/registry/cache/ |
461 | | - ~/.cargo/git/ |
462 | | - target/ |
463 | | - key: ${{ matrix.os }}-${{ matrix.target }}-${{ github.job }}-${{ env.RUST_VERSION }}-${{ hashFiles('./Cargo.lock') }} |
464 | | - restore-keys: | |
465 | | - ${{ matrix.os }}-${{ matrix.target }}-${{ github.job }}-${{ env.RUST_VERSION }}- |
466 | | - ${{ matrix.os }}-${{ matrix.target }}-${{ github.job }}- |
467 | | -
|
468 | | - # Set environment variables required from cross compiling from macos-x86_64 to macos-arm64 |
469 | | - - name: Configure macos-arm64 cross compile config |
470 | | - if: matrix.target == 'aarch64-apple-darwin' |
471 | | - run: | |
472 | | - echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV |
473 | | - echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $GITHUB_ENV |
474 | | -
|
475 | | - - name: Configure artifact names (libc) |
476 | | - if: ${{ matrix.libc }} |
477 | | - shell: bash |
478 | | - run: | |
479 | | - echo "SHORT_TARGET_NAME=${{ matrix.platform }}-${{ matrix.architecture }}-${{ matrix.libc }}" >> $GITHUB_ENV |
480 | | - echo "PRE_GYP_TARGET_NAME=${{ matrix.platform }}-${{ matrix.architecture }}-${{ matrix.libc }}" >> $GITHUB_ENV |
481 | | -
|
482 | | - - name: Configure artifact names (not libc) |
483 | | - if: ${{ ! matrix.libc }} |
484 | | - shell: bash |
485 | | - run: | |
486 | | - echo "SHORT_TARGET_NAME=${{ matrix.platform }}-${{ matrix.architecture }}" >> $GITHUB_ENV |
487 | | - echo "PRE_GYP_TARGET_NAME=${{ matrix.platform }}-${{ matrix.architecture }}-unknown" >> $GITHUB_ENV |
488 | | -
|
489 | | - - name: Build - Node |
490 | | - if: matrix.target != 'x86_64-unknown-linux-musl' |
491 | | - working-directory: components/stacks-devnet-js |
492 | | - run: | |
493 | | - npm install --ignore-scripts |
494 | | - npm run build-${{ env.SHORT_TARGET_NAME }} |
495 | | -
|
496 | | - - name: Build - Node (linux-musl) |
497 | | - if: matrix.target == 'x86_64-unknown-linux-musl' |
498 | | - uses: docker://rust:alpine3.19 |
499 | | - env: |
500 | | - RUSTFLAGS: -C target-feature=-crt-static |
501 | | - with: |
502 | | - entrypoint: /bin/sh |
503 | | - args: -c " |
504 | | - cd components/stacks-devnet-js && |
505 | | - apk add --update alpine-sdk musl-dev clang-dev llvm openssl-dev clang-static nodejs npm git && |
506 | | - npm install --ignore-scripts && |
507 | | - npm run build-${{ env.SHORT_TARGET_NAME }}" |
508 | | - |
509 | | - - name: Compress node artifact |
510 | | - if: github.event_name != 'pull_request' || matrix.target == 'x86_64-unknown-linux-gnu' |
511 | | - shell: bash |
512 | | - run: tar -C components/stacks-devnet-js -zcvf stacks-devnet-js-${{ env.PRE_GYP_TARGET_NAME }}.tar.gz native/index.node |
513 | | - |
514 | | - - name: Upload node artifact |
515 | | - if: github.event_name != 'pull_request' || matrix.target == 'x86_64-unknown-linux-gnu' |
516 | | - uses: actions/upload-artifact@v4 |
517 | | - with: |
518 | | - name: stacks-devnet-js-${{ env.PRE_GYP_TARGET_NAME }} |
519 | | - path: stacks-devnet-js-${{ env.PRE_GYP_TARGET_NAME }}.tar.gz |
520 | | - |
521 | | - - name: NPM Publish |
522 | | - uses: JS-DevTools/npm-publish@v1 |
523 | | - if: matrix.target == 'x86_64-unknown-linux-gnu' && startsWith(github.ref, 'refs/heads/main') && needs.get_release_info.outputs.tag != '' |
524 | | - with: |
525 | | - package: components/stacks-devnet-js/package.json |
526 | | - access: public |
527 | | - greater-version-only: true |
528 | | - token: ${{ secrets.NPM_TOKEN }} |
529 | | - |
530 | 389 | dist_clarity_repl: |
531 | 390 | name: Build Clarity REPL Distribution |
532 | 391 | runs-on: ubuntu-latest |
@@ -653,7 +512,6 @@ jobs: |
653 | 512 | - get_release_info |
654 | 513 | - sanity_check |
655 | 514 | - cargo_test |
656 | | - - dist_stacks_devnet_js |
657 | 515 | - dist_clarity_repl |
658 | 516 | - docker_images |
659 | 517 | permissions: |
|
0 commit comments