From 85cab4c75dce52566875b07c4513864bbfe9c5bc Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 26 Jan 2026 00:27:55 +0300 Subject: ci: consolidate build workflows into zen.yml Remove the standalone APE Portable Build workflow from `build-ape.yml` and integrate its functionality directly into the existing `zen.yml` workflow. The changes add APE-specific steps conditioned on the Ubuntu environment, ensuring targeted builds and releases only occur on the specified platform, streamlining the CI process. --- .github/workflows/build-ape.yml | 59 ----------------------------------------- .github/workflows/zen.yml | 49 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 59 deletions(-) delete mode 100644 .github/workflows/build-ape.yml (limited to '.github') diff --git a/.github/workflows/build-ape.yml b/.github/workflows/build-ape.yml deleted file mode 100644 index ded68fe..0000000 --- a/.github/workflows/build-ape.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: APE Portable Build - -on: - push: - branches: [ "main" ] - tags: [ "v*" ] - pull_request: - branches: [ "main" ] - workflow_dispatch: - -jobs: - build-ape: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y zip wget - - - name: Setup cosmocc - run: | - wget https://cosmo.zip/pub/cosmocc/cosmocc.zip - mkdir -p $HOME/cosmocc - unzip cosmocc.zip -d $HOME/cosmocc - echo "$HOME/cosmocc/bin" >> $GITHUB_PATH - - - name: Build APE - run: | - # Ensure PATH is updated and build with tag-aware versioning - export PATH="$HOME/cosmocc/bin:$PATH" - make clean - make ape - - - name: Upload zc.com Artifact - uses: actions/upload-artifact@v4 - with: - name: zc-portable - path: out/bin/zc.com - - - name: Upload zc-boot.com Artifact - uses: actions/upload-artifact@v4 - with: - name: zc-boot-portable - path: out/bin/zc-boot.com - - - name: Create Release - if: startsWith(github.ref, 'refs/tags/v') - uses: softprops/action-gh-release@v2 - with: - files: | - out/bin/zc.com - out/bin/zc-boot.com - draft: false - prerelease: false - generate_release_notes: true diff --git a/.github/workflows/zen.yml b/.github/workflows/zen.yml index f2cc47a..9fb1326 100644 --- a/.github/workflows/zen.yml +++ b/.github/workflows/zen.yml @@ -3,6 +3,7 @@ name: Zen-C CI on: push: branches: [ "main" ] + tags: [ "v*" ] pull_request: branches: [ "main" ] @@ -12,9 +13,57 @@ jobs: matrix: os: [macos-15-intel, ubuntu-24.04] runs-on: ${{ matrix.os }} + permissions: + contents: write steps: - uses: actions/checkout@v4 - name: make run: make - name: make test run: make test + - name: APE dependencies + if: matrix.os == 'ubuntu-24.04' + run: | + sudo apt-get update + sudo apt-get install -y zip wget + + - name: Setup cosmocc + if: matrix.os == 'ubuntu-24.04' + run: | + wget https://cosmo.zip/pub/cosmocc/cosmocc.zip + mkdir -p $HOME/cosmocc + unzip cosmocc.zip -d $HOME/cosmocc + echo "$HOME/cosmocc/bin" >> $GITHUB_PATH + + - name: Build APE + if: matrix.os == 'ubuntu-24.04' + run: | + # Ensure PATH is updated and build with tag-aware versioning + export PATH="$HOME/cosmocc/bin:$PATH" + make clean + make ape + + - name: Upload zc.com Artifact + if: matrix.os == 'ubuntu-24.04' + uses: actions/upload-artifact@v4 + with: + name: zc-portable + path: out/bin/zc.com + + - name: Upload zc-boot.com Artifact + if: matrix.os == 'ubuntu-24.04' + uses: actions/upload-artifact@v4 + with: + name: zc-boot-portable + path: out/bin/zc-boot.com + + - name: Create Release + if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'ubuntu-24.04' + uses: softprops/action-gh-release@v2 + with: + files: | + out/bin/zc.com + out/bin/zc-boot.com + draft: false + prerelease: false + generate_release_notes: true -- cgit v1.2.3