diff --git a/.github/workflows/build-daily-gcc_p0917.yml b/.github/workflows/build-daily-gcc_p0917.yml new file mode 100644 index 0000000..fd2c0e6 --- /dev/null +++ b/.github/workflows/build-daily-gcc_p0917.yml @@ -0,0 +1,80 @@ +### DO NOT EDIT - created by a script ### +name: gcc_p0917 via gcc p0917-trunk + +on: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: + +jobs: + check-activity: + runs-on: ubuntu-latest + outputs: + should_build: ${{ steps.check.outputs.should_build }} + steps: + - name: Check for recent commits + id: check + env: + GH_TOKEN: ${{ github.token }} + run: | + REPOS='["https://github.com/mattkretz/gcc/tree/P0917_overloadable_conditional_operator"]' + STALE_DAYS=7 + + SINCE_DATE=$(date -d "${STALE_DAYS} days ago" --iso-8601=seconds) + echo "Checking for commits since ${SINCE_DATE} (${STALE_DAYS} days ago)" + HAS_RECENT=false + + for repo in $(echo "$REPOS" | jq -r '.[]'); do + REPO_PATH=$(echo "$repo" | sed -E 's|https://github.com/([^/]+/[^/]+).*|\1|') + BRANCH=$(echo "$repo" | sed -n -E 's|https://github.com/[^/]+/[^/]+/tree/(.+)|\1|p') + + if [ -n "$BRANCH" ]; then + echo "Checking $REPO_PATH (branch: $BRANCH) for recent commits..." + URL="https://api.github.com/repos/${REPO_PATH}/commits?sha=${BRANCH}&since=${SINCE_DATE}&per_page=1" + else + echo "Checking $REPO_PATH (default branch) for recent commits..." + URL="https://api.github.com/repos/${REPO_PATH}/commits?since=${SINCE_DATE}&per_page=1" + fi + + # Authenticate to avoid the 60 req/hour anonymous limit (shared across runner IPs). + # On any API failure, build anyway rather than silently treating it as "no activity". + if ! COMMITS=$(curl -sf \ + -H "Authorization: Bearer ${GH_TOKEN}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "$URL"); then + echo "::warning::GitHub API request failed for $REPO_PATH; building to be safe" + HAS_RECENT=true + break + fi + + if [ "$(echo "$COMMITS" | jq 'length')" -gt 0 ]; then + echo "Found recent commits in $repo" + HAS_RECENT=true + break + fi + done + + if [ "$HAS_RECENT" = "true" ]; then + echo "should_build=true" >> "$GITHUB_OUTPUT" + else + echo "No recent commits in any repo (within ${STALE_DAYS} days), skipping build" + echo "should_build=false" >> "$GITHUB_OUTPUT" + fi + + daily-build: + needs: check-activity + if: ${{ needs.check-activity.outputs.should_build == 'true' }} + runs-on: [ 'self-hosted', 'ce', 'linux', 'x64', 'large' ] + steps: + - name: Start from a clean directory + run: sudo find "$GITHUB_WORKSPACE" -mindepth 1 -delete + - uses: actions/checkout@v7 + - name: Run the build + uses: ./.github/actions/daily-build + with: + image: gcc + name: gcc_p0917 + command: build.sh + args: p0917-trunk + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/build-status.md b/build-status.md index 3378499..95b86b9 100644 --- a/build-status.md +++ b/build-status.md @@ -76,6 +76,7 @@ * [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_lambda_p2034.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_lambda_p2034.yml)![Last success](https://img.shields.io/badge/dynamic/json?color=success&label=Last+OK&query=%24.last_success.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_lambda_p2034)![Last build](https://img.shields.io/badge/dynamic/json?color=yellow&label=Last+build&query=%24.last_build.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_lambda_p2034) * [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_modules.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_modules.yml)![Last success](https://img.shields.io/badge/dynamic/json?color=success&label=Last+OK&query=%24.last_success.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_modules)![Last build](https://img.shields.io/badge/dynamic/json?color=yellow&label=Last+build&query=%24.last_build.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_modules) * [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_notadragon_contracts_p3850.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_notadragon_contracts_p3850.yml)![Last success](https://img.shields.io/badge/dynamic/json?color=success&label=Last+OK&query=%24.last_success.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_notadragon_contracts_p3850)![Last build](https://img.shields.io/badge/dynamic/json?color=yellow&label=Last+build&query=%24.last_build.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_notadragon_contracts_p3850) +* [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_p0917.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_p0917.yml)![Last success](https://img.shields.io/badge/dynamic/json?color=success&label=Last+OK&query=%24.last_success.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_p0917)![Last build](https://img.shields.io/badge/dynamic/json?color=yellow&label=Last+build&query=%24.last_build.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_p0917) * [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_p1144.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_p1144.yml)![Last success](https://img.shields.io/badge/dynamic/json?color=success&label=Last+OK&query=%24.last_success.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_p1144)![Last build](https://img.shields.io/badge/dynamic/json?color=yellow&label=Last+build&query=%24.last_build.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_p1144) * [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_thomas_healy.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_thomas_healy.yml)![Last success](https://img.shields.io/badge/dynamic/json?color=success&label=Last+OK&query=%24.last_success.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_thomas_healy)![Last build](https://img.shields.io/badge/dynamic/json?color=yellow&label=Last+build&query=%24.last_build.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_thomas_healy) * [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_trivial_relocation.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-gcc_trivial_relocation.yml)![Last success](https://img.shields.io/badge/dynamic/json?color=success&label=Last+OK&query=%24.last_success.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_trivial_relocation)![Last build](https://img.shields.io/badge/dynamic/json?color=yellow&label=Last+build&query=%24.last_build.timestamp&url=https%3A%2F%2Flambda.compiler-explorer.com%2Fcompiler-build%2Fgcc_trivial_relocation) diff --git a/compilers.yaml b/compilers.yaml index 3851a25..a4d2ffd 100644 --- a/compilers.yaml +++ b/compilers.yaml @@ -22,6 +22,7 @@ compilers: - { image: gcc, name: gcc_thomas_healy, args: thomas-healy-trunk, repos: ["https://github.com/healytpk/gcc-thomas-healy/tree/trunk"] } - { image: gcc, name: gcc_ilazaric_enclosing_cast, args: ilazaric-enclosing_cast, repos: ["https://github.com/ilazaric/gcc/tree/enclosing_cast"] } - { image: gcc, name: gcc_expr_reflect, args: expr-reflect-trunk, repos: ["https://github.com/yesmanchyk/gcc-mirror/tree/autograd-capable"] } + - { image: gcc, name: gcc_p0917, args: p0917-trunk, repos: ["https://github.com/mattkretz/gcc/tree/P0917_overloadable_conditional_operator"] } - { image: clang, name: clang } - { image: clang, name: clang_amdgpu, args: rocm-trunk, repos: ["https://github.com/ROCm/llvm-project/tree/amd-staging"] } - { image: clang, name: clang_assertions, args: assertions-trunk }