GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — opencode/.github/workflows/release-cli-rs.yml at dev · erickwill/opencode 126 lines (121 loc) · 5.34 KB / Copy pathrelease-cli-rs.ymlFile metadata and controls126 lines (121 loc) · 5.34 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 name: cli-rs release # Builds opencode-native, the Rust client in packages/cli-rs, natively on each runner below and keeps each archive as an # artifact. A cli-rs-v<version> tag also publishes them as a GitHub release. It never becomes Latest: the monorepo's # Latest release drives OpenCode's own update paths. on: push: tags: - "cli-rs-v*" pull_request: paths: - .github/workflows/release-cli-rs.yml workflow_dispatch: permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: build: strategy: fail-fast: false matrix: include: # Zig links Linux against glibc 2.17, OpenTUI's floor. zig_sha is the archive's, from ziglang.org. - runner: ubuntu-24.04 target: x86_64-unknown-linux-gnu zig: x86_64-linux-gnu.2.17 zig_sha: 3581863e3cbcfd0fce0efc682ce7e9e93da96668a977791d356a26d2a7e9b17a - runner: ubuntu-24.04-arm target: aarch64-unknown-linux-gnu zig: aarch64-linux-gnu.2.17 zig_sha: a1546d5646eb184437918d6635ca6b762a0e889eac09cef720ee7a1ed3fe7795 - { runner: macos-15-intel, target: x86_64-apple-darwin } - { runner: macos-15, target: aarch64-apple-darwin } - { runner: windows-2025, target: x86_64-pc-windows-msvc, exe: .exe } runs-on: ${{ matrix.runner }} timeout-minutes: 60 defaults: run: shell: bash working-directory: packages/cli-rs env: OPENCODE_NATIVE_COMMIT: ${{ github.sha }} CARGO_PROFILE_DIST_STRIP: symbols MACOSX_DEPLOYMENT_TARGET: "13.0" # No Visual C++ runtime to install beside the .exe. CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUSTFLAGS: -C target-feature=+crt-static steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 with: persist-credentials: false - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: bun-version-file: package.json # The version opencode-native --version prints: the tag's, or 0.0.0-<commit> for any other run. - name: Version run: | version=0.0.0-$GITHUB_SHA if [[ $GITHUB_REF == refs/tags/cli-rs-v* ]]; then version=${GITHUB_REF_NAME#cli-rs-v}; fi echo "OPENCODE_VERSION=$version" >> "$GITHUB_ENV" # Zig 0.17.1 as the C and C++ compiler and the linker. The wrapper drops flags zig rejects: cc's --target, and # rustc's Cortex-A53 erratum fix on aarch64. - if: matrix.zig working-directory: ${{ runner.temp }} run: | file=zig-$(uname -m)-linux-0.17.1 curl -fsSL --retry 3 -o zig.tar.xz "https://ziglang.org/download/0.17.1/$file.tar.xz" echo "${{ matrix.zig_sha }} zig.tar.xz" | sha256sum -c tar -xJf zig.tar.xz for tool in cc c++; do cat > "zig-$tool" <<EOF #!/bin/sh for a; do shift; case \$a in --target=*|-Wl,--fix-cortex-a53-843419) ;; *) set -- "\$@" "\$a" ;; esac; done exec "$PWD/$file/zig" $tool -target ${{ matrix.zig }} "\$@" EOF chmod +x "zig-$tool" done triple=$(tr a-z- A-Z_ <<< "${{ matrix.target }}") { echo "CARGO_TARGET_${triple}_LINKER=$PWD/zig-cc"; echo "CC_${triple,,}=$PWD/zig-cc" echo "CXX_${triple,,}=$PWD/zig-c++"; echo "CXXSTDLIB_${triple,,}=c++"; } >> "$GITHUB_ENV" # rustup reads rust-toolchain.toml; `bun run cargo` first fetches OpenTUI's native library from its release. - run: rustup toolchain install - run: bun run cargo build --locked --profile dist --bin opencode-native - name: Check glibc 2.17 and no libstdc++ if: matrix.zig run: "! readelf -dV target/dist/opencode-native | grep -E 'GLIBC_2\\.(1[89]|[2-9][0-9])|libstdc\\+\\+'" - name: Package run: | name=opencode-native-$OPENCODE_VERSION-${{ matrix.target }} mkdir -p "dist/$name" cp "target/dist/opencode-native${{ matrix.exe }}" "dist/$name/" # Our licence, and OpenTUI's licences (FFmpeg's among them) from its native release zip. cp ../../LICENSE "dist/$name/" cp -r .opentui/*/host/licenses "dist/$name/" tar -C dist -czf "dist/$name.tar.gz" "$name" ls -l "dist/$name" "dist/$name.tar.gz" - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: opencode-native-${{ matrix.target }} path: packages/cli-rs/dist/*.tar.gz if-no-files-found: error compression-level: 0 release: needs: build if: startsWith(github.ref, 'refs/tags/cli-rs-v') runs-on: ubuntu-24.04 permissions: contents: write steps: - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 with: pattern: opencode-native-* merge-multiple: true - name: Publish env: GH_TOKEN: ${{ github.token }} run: | sha256sum ./*.tar.gz > SHA256SUMS gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --verify-tag --latest=false \ --title "opencode-native ${GITHUB_REF_NAME#cli-rs-v}" --notes "The Rust client (packages/cli-rs) at $GITHUB_SHA." \ ./*.tar.gz SHA256SUMS |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |