diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 379e8caba45e..f4176d030464 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,28 +2,12 @@ name: CI on: push: - branches: [ risc0 ] - pull_request: - branches: [ risc0 ] - workflow_call: - workflow_dispatch: + tags: + - '*' jobs: build: - strategy: - fail-fast: false - matrix: - include: - - os: macOS - arch: ARM64 - triple: aarch64-apple-darwin - - os: macOS - arch: X64 - triple: x86_64-apple-darwin - - os: Linux - arch: X64 - triple: x86_64-unknown-linux-gnu - runs-on: [ self-hosted, prod, "${{ matrix.os }}", "${{ matrix.arch }}" ] + runs-on: buildjet-32vcpu-ubuntu-2204 steps: - name: Install Rust uses: risc0/actions-rs-toolchain@v1 @@ -51,8 +35,37 @@ jobs: - name: Archive build output uses: actions/upload-artifact@v3 with: - name: rust-toolchain-${{ matrix.triple }} + name: rust-toolchain-x86_64-unknown-linux-gnu path: | - rust/build/${{ matrix.triple }}/stage2 - !rust/build/${{ matrix.triple }}/stage2/lib/rustlib/src - !rust/build/${{ matrix.triple }}/stage2/lib/rustlib/rustc-src + rust/build/x86_64-unknown-linux-gnu/stage2 + !rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/src + !rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/rustc-src + + release: + needs: build + runs-on: buildjet-32vcpu-ubuntu-2204 + permissions: + contents: write + steps: + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + - name: Compress artifacts + shell: bash + run: | + ls -lha ./artifacts + mkdir assets + for DIR in $(ls ./artifacts); do + tar czf "assets/$DIR.tar.gz" -C "artifacts/$DIR" . + done + ls -lha ./assets + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "Installing gh CLI..." + curl -L https://github.com/cli/cli/releases/download/v2.17.0/gh_2.17.0_linux_amd64.tar.gz | tar xvz --strip-components=2 --exclude=man + chmod +x ./gh + + ./gh release create --repo "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" ./assets/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 07cb13bdd749..000000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Release -on: - push: - tags: - - '*' - -jobs: - build: - uses: ./.github/workflows/ci.yml - - release: - needs: build - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Download artifacts - uses: actions/download-artifact@v3 - with: - path: artifacts - - name: Compress artifacts - shell: bash - run: | - ls -lha ./artifacts - mkdir assets - for DIR in $(ls ./artifacts); do - tar czf "assets/$DIR.tar.gz" -C "artifacts/$DIR" . - done - ls -lha ./assets - - name: Create release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - echo "Installing gh CLI..." - curl -L https://github.com/cli/cli/releases/download/v2.17.0/gh_2.17.0_linux_amd64.tar.gz | tar xvz --strip-components=2 --exclude=man - chmod +x ./gh - - ./gh release create --repo "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" ./assets/* -