From f614fc9dd5d712c3b1e2ebea61321227b9ef0ef1 Mon Sep 17 00:00:00 2001 From: Alexander Koz Date: Wed, 3 Apr 2024 10:54:58 +0400 Subject: [PATCH] CI: more temp dev-builds --- .github/workflows/dev-build.yml | 57 +++++++++++++++------------------ .github/workflows/release.yml | 1 - 2 files changed, 26 insertions(+), 32 deletions(-) diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index 7bcf9a0c..78118594 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -9,7 +9,7 @@ on: description: "Source SHA used to build bindings. Uses `github.sha`` by default." required: false push: - branches: [dev/**, refactor/**] + branches: [dev*, refactor*, dev/**, refactor/**] env: CARGO_NET_RETRY: 10 @@ -29,7 +29,7 @@ jobs: matrix: os: - macos-14 - # - macos-latest + - macos-12 - ubuntu-latest - windows-latest defaults: @@ -42,7 +42,7 @@ jobs: ref: ${{ github.event.inputs.source || github.ref || github.event.ref }} - name: Cache - uses: actions/cache@v4.0.2 + uses: actions/cache@v4 with: path: | target/ @@ -57,54 +57,49 @@ jobs: - name: Install Deps uses: ./.github/actions/tools-deps - - name: cargo + - name: prepare names + id: names + shell: bash + run: | + echo "os=-${{ runner.os }}" >> "$GITHUB_OUTPUT" + echo "ext=${{ ((runner.os == 'Windows') && '.exe') || ' ' }}" >> "$GITHUB_OUTPUT" + echo "suffix=${{ (runner.os == 'Windows' && format('-{0}', runner.arch)) || format('-{0}-{1}', runner.os, runner.arch) }}" >> "$GITHUB_OUTPUT" + echo "full=${{ (runner.os == 'Windows' && format('-{0}.exe', runner.arch)) || format('-{0}-{1}', runner.os, runner.arch) }}" >> "$GITHUB_OUTPUT" + + - name: pdtool continue-on-error: true - run: cargo build --bin=cargo-playdate + run: cargo build -p=playdate-tool --bin=pdtool --features=tracing - name: Upload uses: actions/upload-artifact@v4 with: - name: cargo-playdate-${{ runner.os }}-${{ runner.arch }}${{ ((runner.os == 'Windows') && '.exe') || ' ' }} - path: target/debug/cargo-playdate${{ ((runner.os == 'Windows') && '.exe') || ' ' }} + name: pdtool${{ steps.names.outputs.full }} + path: target/debug/pdtool${{ steps.names.outputs.ext }} if-no-files-found: warn retention-days: 3 overwrite: true - - - name: pdtool + - name: bindgen continue-on-error: true - run: cargo build -p=playdate-tool --bin=pdtool - + run: >- + cargo build --bin=pdbindgen --no-default-features + --features=cli,documentation,extra-codegen,logging,pretty-please,which-rustfmt,runtime - name: Upload - id: upload uses: actions/upload-artifact@v4 with: - name: pdtool-${{ runner.os }}-${{ runner.arch }}${{ ((runner.os == 'Windows') && '.exe') || ' ' }} - path: target/debug/pdtool${{ ((runner.os == 'Windows') && '.exe') || ' ' }} + name: pdbindgen${{ steps.names.outputs.full }} + path: target/debug/pdbindgen${{ steps.names.outputs.ext }} if-no-files-found: warn retention-days: 3 overwrite: true - - name: Artifact - run: | - echo 'ID: ${{ steps.upload.outputs.artifact-id }}' - echo 'URL: ${{ steps.upload.outputs.artifact-url }}' - - name: pdtool with tracing + - name: cargo continue-on-error: true - run: cargo build -p=playdate-tool --bin=pdtool --features=tracing - + run: cargo build --bin=cargo-playdate --all-features - name: Upload uses: actions/upload-artifact@v4 with: - name: pdtool+tracing-${{ runner.os }}-${{ runner.arch }}${{ ((runner.os == 'Windows') && '.exe') || ' ' }} - path: target/debug/pdtool${{ ((runner.os == 'Windows') && '.exe') || ' ' }} + name: cargo-playdate${{ steps.names.outputs.full }} + path: target/debug/cargo-playdate${{ steps.names.outputs.ext }} if-no-files-found: warn retention-days: 3 overwrite: true - - name: Artifact - run: | - echo 'ID: ${{ steps.upload.outputs.artifact-id }}' - echo 'URL: ${{ steps.upload.outputs.artifact-url }}' - - outputs: - artifact-id: ${{ steps.upload.outputs.artifact-id }} - artifact-url: ${{ steps.upload.outputs.artifact-url }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a9c34ff..56335768 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,7 +101,6 @@ jobs: run: >- cargo build --release --bin=pdbindgen --no-default-features --features=cli,documentation,extra-codegen,logging,pretty-please,which-rustfmt,runtime - # ${{ ((runner.os == 'Windows') && 'static') || 'runtime' }} - name: bindgen to upload if: steps.bindgen.outcome == 'success' && runner.os != 'macOS'