Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/build-daily-clang_swiftlang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
### DO NOT EDIT - created by a script ###
name: clang_swiftlang via clang swiftlang-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
run: |
REPOS='["https://github.com/swiftlang/llvm-project/tree/next"]'
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..."
COMMITS=$(curl -sf "https://api.github.com/repos/${REPO_PATH}/commits?sha=${BRANCH}&since=${SINCE_DATE}&per_page=1" || echo "[]")
else
echo "Checking $REPO_PATH (default branch) for recent commits..."
COMMITS=$(curl -sf "https://api.github.com/repos/${REPO_PATH}/commits?since=${SINCE_DATE}&per_page=1" || echo "[]")
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' ]
steps:
- name: Start from a clean directory
uses: AutoModality/action-clean@v1.1.0
- uses: actions/checkout@v4
- name: Run the build
uses: ./.github/actions/daily-build
with:
image: clang
name: clang_swiftlang
command: build.sh
args: swiftlang-trunk
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
1 change: 1 addition & 0 deletions build-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-clang_patmat.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-clang_patmat.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%2Fclang_patmat)![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%2Fclang_patmat)
* [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-clang_reflection.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-clang_reflection.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%2Fclang_reflection)![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%2Fclang_reflection)
* [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-clang_relocatable.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-clang_relocatable.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%2Fclang_relocatable)![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%2Fclang_relocatable)
* [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-clang_swiftlang.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-clang_swiftlang.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%2Fclang_swiftlang)![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%2Fclang_swiftlang)
* [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-clang_variadic_friends.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-clang_variadic_friends.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%2Fclang_variadic_friends)![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%2Fclang_variadic_friends)
* [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-clspv.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-clspv.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%2Fclspv)![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%2Fclspv)
* [![Status](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-cppfront.yml/badge.svg)](https://github.com/compiler-explorer/compiler-workflows/actions/workflows//build-daily-cppfront.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%2Fcppfront)![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%2Fcppfront)
Expand Down
1 change: 1 addition & 0 deletions compilers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ compilers:
- { image: clang, name: clang_relocatable, args: relocatable-trunk, repos: ["https://github.com/Quuxplusone/llvm-project/tree/trivially-relocatable"] }
- { image: clang, name: clang_variadic_friends, args: variadic-friends-trunk, repos: ["https://github.com/dancrn/llvm-project/tree/cxx-variadic-friends"] }
- { image: clang, name: clang_hana, args: hana-clang-trunk, repos: ["https://github.com/hanickadot/llvm-project/tree/compiler-explorer/hana-clang"] }
- { image: clang, name: clang_swiftlang, args: swiftlang-trunk, repos: ["https://github.com/swiftlang/llvm-project/tree/next"] }
- { image: dotnet, name: dotnet, command: build.sh, args: trunk }
- { image: clang, name: mlir_trunk, args: mlir-trunk }
- { image: go, name: go }
Expand Down
Loading