diff --git a/.github/workflows/build-base.yml b/.github/workflows/build-base.yml index bad1ee74..159583a7 100644 --- a/.github/workflows/build-base.yml +++ b/.github/workflows/build-base.yml @@ -162,6 +162,8 @@ jobs: uses: mlugg/setup-zig@v1 with: version: ${{ inputs.zig-version }} + # Build/Package the project. The working directory is for building + # sub-projects. - name: Build run: | zig build ${{ inputs.zig-args }} diff --git a/.github/workflows/zig-build-base.yml b/.github/workflows/zig-build-base.yml deleted file mode 100644 index aa522ed8..00000000 --- a/.github/workflows/zig-build-base.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: Reusable zig build workflow - -on: - workflow_call: - inputs: - # The version to build on - zig-version: - required: false - type: string - default: 0.13.0 - # Whether or not to clone submodules - get-submodules: - required: false - type: string - default: false - # If using sparse checkout, the file patterns to include when cloning - sparse-checkout-patterns: - required: false - type: string - default: "" - # If building a subproject only, you can specify a working directory - # which is the path to that subproject. - working-directory: - required: false - type: string - default: "." - # Whether or not to use a provided package command. - is-packaged: - required: false - type: boolean - default: false - # The github artifact name for uploading build artifacts to - # If it is blank, nothing will be uploaded - github-artifact-name: - required: false - type: string - default: "" - # The path that we should upload artifacts from - artifact-output-paths: - required: true - type: string - ref: - required: false - type: string - default: "" - secrets: - # The downloads url for the packaging step. This is used in boxzer to - # fill in the manifest downloads location - downloads-url: - required: false - -jobs: - build-zig: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] #, windows-latest, macos-latest] - steps: - - name: Checkout - if: ${{ inputs.ref == '' }} - uses: actions/checkout@v4 - with: - sparse-checkout: ${{ inputs.sparse-checkout-patterns }} - submodules: ${{ inputs.get-submodules }} - - name: Checkout Specific Ref - if: ${{ inputs.ref != '' }} - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - sparse-checkout: ${{ inputs.sparse-checkout-patterns }} - submodules: ${{ inputs.get-submodules }} - - name: Setup Zig - uses: mlugg/setup-zig@v1 - with: - version: ${{ inputs.zig-version }} - - name: Build - if: ${{ ! inputs.is-packaged || runner.os != 'macOS' }} - run: zig build -Doptimize=ReleaseSmall - working-directory: ${{ inputs.working-directory }} - - name: Package - if: ${{ inputs.is-packaged && runner.os == 'macOS' }} - run: zig build package -- "${{ secrets.downloads-url }}" - - name: Upload Artifacts - if: ${{ inputs.artifact-output-paths == '' }} - uses: actions/upload-artifact@v4 - with: - name: ${{ inputs.github-artifact-name }} - path: ${{ inputs.artifact-output-paths }} diff --git a/.github/workflows/zig-master-build.yml b/.github/workflows/zig-master-build.yml index 5d771d94..234f2316 100644 --- a/.github/workflows/zig-master-build.yml +++ b/.github/workflows/zig-master-build.yml @@ -7,29 +7,13 @@ on: # A simple workflow that will, upon a push or PR to zig-master, build microzig jobs: - # No we don't need this still, I'm just happy about figuring out the jq query - # (I don't want to hear that it is simple, I think it's cool xD) - # get-branch: - # runs-on: ubuntu-latest - # outputs: - # ref: ${{ steps.gmrp.outputs.ref }} - # steps: - # - name: checkout - # uses: actions/checkout@v4 - # - name: get-most-recent-pr - # id: gmrp - # run: | - # echo "ref=$(gh pr list -B zig-master --limit 30 --json headRefName,number -q '[.[] | select(.headRefName | startswith("master-patch"))] | max_by(.number) | .headRefName')" >> $GITHUB_OUTPUT - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build-microzig-master-post-pr: name: Build with master uses: ./.github/workflows/build-base.yml with: zig-version: master get-submodules: true - is-packaged: true - artifact-output-paths: boxzer-out + is-packaged: false zig-args: -Doptimize=ReleaseSmall secrets: downloads-url: ${{ secrets.DOWNLOADS_URL }}