AutoBuild: llvm started at 2024-12-18-06UTC (#11004)

* Llvm19_build => 19.1.6

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Add built packages for linux/386 to llvm

* Add built packages for linux/amd64 to llvm

* Add built packages for linux/arm/v7 to llvm

* fixup llvm19_build package

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Fixup build workflow.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Bump version on llvm19_dev, llvm19_lib

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Add built packages for linux/386 to llvm

* Add built packages for linux/amd64 to llvm

* fixup build workflow

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Add built packages for linux/arm/v7 to llvm

* Final package additions for llvm build process.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Add built packages for linux/386 to llvm

* Add built packages for linux/amd64 to llvm

* Add built packages for linux/arm/v7 to llvm

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
Co-authored-by: Satadru Pramanik <satadru@gmail.com>
Co-authored-by: satmandu <satmandu@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-12-18 01:55:07 -06:00
committed by GitHub
parent d24ede8b07
commit ace184d388
12 changed files with 138 additions and 134 deletions

View File

@@ -2,8 +2,13 @@
name: Build
on:
workflow_dispatch:
inputs:
branch:
description: "Branch of chromebrew/chromebrew to run on, if different from this branch."
required: false
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # setting GH_TOKEN for the entire workflow
BRANCH: ${{ inputs.branch || github.ref_name }}
permissions:
actions: write
contents: write
@@ -12,10 +17,16 @@ permissions:
repository-projects: read
jobs:
setup:
if: ${{ ( github.repository_owner == 'chromebrew' ) && ( github.ref_name != 'master' ) }}
if: ${{ ( github.repository_owner == 'chromebrew' ) && ( inputs.branch != 'master' ) && ( github.ref_name != 'master' ) }}
runs-on: ubuntu-24.04
outputs:
output1: ${{ steps.set-variables.outputs.TIMESTAMP }} # https://stackoverflow.com/a/75142892
timestamp: ${{ steps.set-timestamp.outputs.TIMESTAMP }} # https://stackoverflow.com/a/75142892
changed_packages: ${{ steps.changed-packages.outputs.CHANGED_PACKAGES }}
glibc_232_compat: ${{ steps.get-compatibility.outputs.GLIBC_232_COMPATIBLE_PACKAGES }}
glibc_237_compat: ${{ steps.get-compatibility.outputs.GLIBC_237_COMPATIBLE_PACKAGES }}
i686_packages: ${{ steps.get-compatibility.outputs.i686_PACKAGES }}
x86_64_packages: ${{ steps.get-compatibility.outputs.x86_64_PACKAGES }}
armv7l_packages: ${{ steps.get-compatibility.outputs.armv7l_PACKAGES }}
steps:
- uses: actions/checkout@v4
with:
@@ -30,13 +41,68 @@ jobs:
- name: Push rebase changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref_name }}
branch: ${{ env.BRANCH }}
force: true
- name: Set workflow & branch variables
id: set-variables
- name: Set Timestamp
id: set-timestamp
run: |
export TIMESTAMP="$(date -u +%F-%H%Z)"
echo "TIMESTAMP=${TIMESTAMP}" >> $GITHUB_OUTPUT
- name: Get all changed package files
id: changed-ruby-files
uses: tj-actions/changed-files@v45
with:
base_sha: master
files: packages/*.rb
since_last_remote_commit: true
- name: Export variables to github context
id: changed-packages
run: |
# Convert "packages/foo.rb packages/bar.rb" (from steps.changed-ruby-files.outputs.all_changed_files) into "foo bar"
echo "CHANGED_PACKAGES=$(echo "${{ steps.changed-ruby-files.outputs.all_changed_files }}" | xargs basename -s .rb | xargs)" >> $GITHUB_ENV
echo "CHANGED_PACKAGES=$(echo "${{ steps.changed-ruby-files.outputs.all_changed_files }}" | xargs basename -s .rb | xargs)" >> $GITHUB_OUTPUT
- name: Determine glibc and architecture package compatibility
id: get-compatibility
run: |
# If a package doesnt have a min_glibc value, or if it is below 2.32, add it to GLIBC_232_COMPATIBLE_PACKAGES.
export GLIBC_232_COMPATIBLE_PACKAGES="$(for i in ${CHANGED_PACKAGES} ; do grep min_glibc packages/${i}.rb | tr -d \' | awk '{exit $2 <= 2.32}' || echo ${i} ; done | xargs)"
if [[ -n ${GLIBC_232_COMPATIBLE_PACKAGES} ]]; then
echo "GLIBC_232_COMPATIBLE_PACKAGES=${GLIBC_232_COMPATIBLE_PACKAGES}" >> $GITHUB_ENV
echo "GLIBC_232_COMPATIBLE_PACKAGES=${GLIBC_232_COMPATIBLE_PACKAGES}" >> $GITHUB_OUTPUT
echo "Branch ${{ env.BRANCH }} has these possibly Glibc 2.32 compatible packages: ${GLIBC_232_COMPATIBLE_PACKAGES}"
fi
# If a package doesnt have a min_glibc value, or if it is below 2.37, add it to GLIBC_237_COMPATIBLE_PACKAGES.
export GLIBC_237_COMPATIBLE_PACKAGES="$(for i in ${CHANGED_PACKAGES} ; do grep min_glibc packages/${i}.rb | tr -d \' | awk '{exit $2 <= 2.37}' || echo ${i} ; done | xargs)"
if [[ -n ${GLIBC_237_COMPATIBLE_PACKAGES} ]]; then
echo "GLIBC_237_COMPATIBLE_PACKAGES=${GLIBC_237_COMPATIBLE_PACKAGES}" >> $GITHUB_ENV
echo "GLIBC_237_COMPATIBLE_PACKAGES=${GLIBC_237_COMPATIBLE_PACKAGES}" >> $GITHUB_OUTPUT
echo "Branch ${{ env.BRANCH }} has these possibly Glibc 2.37 compatible packages: ${GLIBC_237_COMPATIBLE_PACKAGES}"
fi
# If a package has a compatibility of 'all' or one that includes 'x86_64', add it to x86_64_PACKAGES.
export x86_64_PACKAGES="$(for i in ${CHANGED_PACKAGES}; do grep -q "[[:space:]]compatibility.*all\|[[:space:]]compatibility.*x86_64" packages/${i}.rb && echo ${i}; done | xargs)"
if [[ -n ${x86_64_PACKAGES} ]]; then
echo "x86_64_PACKAGES=${x86_64_PACKAGES}" >> $GITHUB_ENV
echo "x86_64_PACKAGES=${x86_64_PACKAGES}" >> $GITHUB_OUTPUT
echo "Branch ${{ env.BRANCH }} has these x86_64 compatible packages: ${x86_64_PACKAGES}"
fi
## If a package has a compatibility of 'all' or one that includes 'armv7l', add it to armv7l_PACKAGES.
export armv7l_PACKAGES="$(for i in ${CHANGED_PACKAGES}; do grep -q "[[:space:]]compatibility.*all\|[[:space:]]compatibility.*armv7l" packages/${i}.rb && echo ${i}; done | xargs)"
if [[ -n ${armv7l_PACKAGES} ]]; then
echo "armv7l_PACKAGES=${armv7l_PACKAGES}" >> $GITHUB_ENV
echo "armv7l_PACKAGES=${armv7l_PACKAGES}" >> $GITHUB_OUTPUT
echo "Branch ${{ env.BRANCH }} has these armv7l compatible packages: ${armv7l_PACKAGES}"
fi
## If a package has a compatibility of 'all' or one that includes 'i686', add it to i686_PACKAGES.
export i686_PACKAGES="$(for i in ${CHANGED_PACKAGES}; do grep -q "[[:space:]]compatibility.*all\|[[:space:]]compatibility.*i686" packages/${i}.rb && echo ${i}; done | xargs)"
if [[ -n ${i686_PACKAGES} ]]; then
echo "i686_PACKAGES=${i686_PACKAGES}" >> $GITHUB_ENV
echo "i686_PACKAGES=${i686_PACKAGES}" >> $GITHUB_OUTPUT
echo "Branch ${{ env.BRANCH }} has these i686 compatible packages: ${i686_PACKAGES}"
fi
generate:
strategy:
max-parallel: 1
@@ -54,6 +120,16 @@ jobs:
runner: [self-hosted, X64]
runs-on: ${{ matrix.runner }}
needs: setup
env:
CREW_REPO: ${{ github.event.repository.clone_url }}
CREW_BRANCH: ${{ inputs.branch || github.ref_name }}
TARGET_ARCH: ${{ matrix.arch }}
TIMESTAMP: ${{ needs.setup.outputs.timestamp }}
GLIBC_232_COMPATIBLE_PACKAGES: ${{ needs.setup.outputs.glibc_232_compat }}
GLIBC_237_COMPATIBLE_PACKAGES: ${{ needs.setup.outputs.glibc_237_compat }}
i686_PACKAGES: ${{ needs.setup.outputs.i686_packages }}
x86_64_PACKAGES: ${{ needs.setup.outputs.x86_64_packages }}
armv7l_PACKAGES: ${{ needs.setup.outputs.armv7l_packages }}
if: ${{ !cancelled() }}
concurrency:
group: ${{ matrix.arch }}-${{ github.workflow }}-${{ github.ref }}
@@ -90,64 +166,7 @@ jobs:
with:
fetch-depth: 0
persist-credentials: true
- name: Rebase to master
run: |
git fetch origin
git checkout ${{ github.ref_name }}
git reset --hard origin/${{ github.ref_name }}
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git pull --rebase origin master && git push -f
- name: Get all changed package files
id: changed-ruby-files
uses: tj-actions/changed-files@v45
with:
base_sha: master
files: packages/*.rb
since_last_remote_commit: true
- name: Export variables to github context
run: |
# Convert "packages/foo.rb packages/bar.rb" (from steps.changed-ruby-files.outputs.all_changed_files) into "foo bar"
echo "CHANGED_PACKAGES=$(echo "${{ steps.changed-ruby-files.outputs.all_changed_files }}" | xargs basename -s .rb | xargs)" >> $GITHUB_ENV
- name: Determine glibc and architecture package compatibility
run: |
# If a package doesnt have a min_glibc value, or if it is below 2.32, add it to GLIBC_232_COMPATIBLE_PACKAGES.
export GLIBC_232_COMPATIBLE_PACKAGES="$(for i in ${CHANGED_PACKAGES} ; do grep min_glibc packages/${i}.rb | tr -d \' | awk '{exit $2 <= 2.32}' || echo ${i} ; done | xargs)"
if [[ -n ${GLIBC_232_COMPATIBLE_PACKAGES} ]]; then
echo "GLIBC_232_COMPATIBLE_PACKAGES=${GLIBC_232_COMPATIBLE_PACKAGES}" >> $GITHUB_ENV
echo "Branch ${{ github.ref_name }} has these possibly Glibc 2.32 compatible packages: ${GLIBC_232_COMPATIBLE_PACKAGES}"
fi
# If a package doesnt have a min_glibc value, or if it is below 2.37, add it to GLIBC_237_COMPATIBLE_PACKAGES.
export GLIBC_237_COMPATIBLE_PACKAGES="$(for i in ${CHANGED_PACKAGES} ; do grep min_glibc packages/${i}.rb | tr -d \' | awk '{exit $2 <= 2.37}' || echo ${i} ; done | xargs)"
if [[ -n ${GLIBC_237_COMPATIBLE_PACKAGES} ]]; then
echo "GLIBC_237_COMPATIBLE_PACKAGES=${GLIBC_237_COMPATIBLE_PACKAGES}" >> $GITHUB_ENV
echo "Branch ${{ github.ref_name }} has these possibly Glibc 2.37 compatible packages: ${GLIBC_237_COMPATIBLE_PACKAGES}"
fi
# If a package has a compatibility of 'all' or one that includes 'x86_64', add it to x86_64_PACKAGES.
export x86_64_PACKAGES="$(for i in ${CHANGED_PACKAGES}; do grep -q "[[:space:]]compatibility.*all\|[[:space:]]compatibility.*x86_64" packages/${i}.rb && echo ${i}; done | xargs)"
if [[ -n ${x86_64_PACKAGES} ]]; then
echo "x86_64_PACKAGES=${x86_64_PACKAGES}" >> $GITHUB_ENV
echo "Branch ${{ github.ref_name }} has these x86_64 compatible packages: ${x86_64_PACKAGES}"
fi
## If a package has a compatibility of 'all' or one that includes 'armv7l', add it to ARMV7L_PACKAGES.
export ARMV7L_PACKAGES="$(for i in ${CHANGED_PACKAGES}; do grep -q "[[:space:]]compatibility.*all\|[[:space:]]compatibility.*armv7l" packages/${i}.rb && echo ${i}; done | xargs)"
if [[ -n ${ARMV7L_PACKAGES} ]]; then
echo "ARMV7L_PACKAGES=${ARMV7L_PACKAGES}" >> $GITHUB_ENV
echo "Branch ${{ github.ref_name }} has these armv7l compatible packages: ${ARMV7L_PACKAGES}"
fi
## If a package has a compatibility of 'all' or one that includes 'i686', add it to i686_PACKAGES.
export i686_PACKAGES="$(for i in ${CHANGED_PACKAGES}; do grep -q "[[:space:]]compatibility.*all\|[[:space:]]compatibility.*i686" packages/${i}.rb && echo ${i}; done | xargs)"
if [[ -n ${i686_PACKAGES} ]]; then
echo "i686_PACKAGES=${i686_PACKAGES}" >> $GITHUB_ENV
echo "Branch ${{ github.ref_name }} has these i686 compatible packages: ${i686_PACKAGES}"
fi
- name: Export target docker container to github context
env:
TARGET_ARCH: ${{ matrix.arch }}
run: |
case $TARGET_ARCH in
x86_64)
@@ -184,11 +203,8 @@ jobs:
- name: Run Updater in container
id: run-updater
if: ${{ !cancelled() }}
env:
CREW_REPO: ${{ github.event.repository.clone_url }}
CREW_BRANCH: ${{ github.ref_name }}
run: |
if ([ "$PLATFORM" == 'linux/arm/v7' ] && [ -z "${ARMV7L_PACKAGES}" ]); then
if ([ "$PLATFORM" == 'linux/arm/v7' ] && [ -z "${armv7l_PACKAGES}" ]); then
# Exit the arm container if there are not armv7l compatible packages.
echo "Skipping armv7l container builds."
exit 0
@@ -203,8 +219,9 @@ jobs:
fi
git fetch origin
git checkout ${{ github.ref_name }}
git reset --hard origin/${{ github.ref_name }}
git checkout ${{ env.BRANCH }}
git reset --hard origin/${{ env.BRANCH }}
git log --oneline -10
docker pull --platform ${PLATFORM} satmandu/crewbuild:${CONTAINER}
sudo apt install -y acl
sudo setfacl -R -m u:1000:rwx .
@@ -213,7 +230,6 @@ jobs:
# docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
# ghcr.io/felipecrs/dond-shim:latest \
(cd /tmp ; curl -OLf https://github.com/felipecrs/docker-on-docker-shim/raw/refs/tags/v0.7.1/dond ; chmod +x /tmp/dond )
# docker run \
/tmp/dond run \
--rm \
--platform ${PLATFORM} \
@@ -232,14 +248,12 @@ jobs:
sudo rm -rf release
- name: Add updated packages to branch.
id: push-check
env:
UPDATE_BRANCH_NAME: ${{ github.ref_name }}
run: |
if [ -n "$(git status --porcelain)" ]; then
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add -A
git commit -m "Add built packages for ${PLATFORM} to ${{ github.ref_name }}" && git push -f
git commit -m "Add built packages for ${PLATFORM} to ${{ env.BRANCH }}" && git push -f
git log --oneline -10
fi
build-check:
@@ -258,25 +272,6 @@ jobs:
with:
fetch-depth: 0
persist-credentials: true
- name: Rebase to master
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git fetch origin
git reset --hard origin/${{ github.ref_name }}
git pull --rebase origin master && git push -f
git log --oneline -10
- name: Get all changed package files
id: changed-ruby-files
uses: tj-actions/changed-files@v45
with:
base_sha: master
files: packages/*.rb
since_last_remote_commit: true
- name: Export CHANGED_PACKAGES
run: |
# Convert "packages/foo.rb packages/bar.rb" (from steps.changed-ruby-files.outputs.all_changed_files) into "foo bar"
echo "CHANGED_PACKAGES=$(echo "${{ steps.changed-ruby-files.outputs.all_changed_files }}" | xargs basename -s .rb | xargs)" >> $GITHUB_ENV
- name: Get all changed manifest files
id: changed-manifest-files
uses: tj-actions/changed-files@v45
@@ -284,17 +279,26 @@ jobs:
base_sha: master
files: manifest/**
since_last_remote_commit: true
- name: Rebase to master
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git fetch origin
git reset --hard origin/${{ env.BRANCH }}
git pull --rebase origin master && git push -f
git log --oneline -10
- name: Create Pull Request
env:
TIMESTAMP: ${{ needs.update-check.outputs.output1 }}
CHANGED_MANIFEST_FILES: ${{ steps.changed-manifest-files.outputs.all_changed_files }}
x86_64_PACKAGES: ${{ env.x86_64_PACKAGES }}
i686_PACKAGES: ${{ env.i686_PACKAGES }}
armv7l_PACKAGES: ${{ env.armv7l_PACKAGES }}
CHANGED_PACKAGES: ${{ needs.setup.outputs.changed_packages }}
TIMESTAMP: ${{ needs.setup.outputs.timestamp }}
i686_PACKAGES: ${{ needs.setup.outputs.i686_packages }}
x86_64_PACKAGES: ${{ needs.setup.outputs.x86_64_packages }}
armv7l_PACKAGES: ${{ needs.setup.outputs.armv7l_packages }}
run: |
rm -rf /tmp/pr.txt
echo -e "## Description" >> /tmp/pr.txt
echo -e "- This PR has built package updates using the Build.yml workflow, which was pointed to the ${{ github.ref_name }} branch.\n" >> /tmp/pr.txt
echo -e "- This PR has built package updates using the Build.yml workflow, which was pointed to the ${{ env.BRANCH }} branch.\n" >> /tmp/pr.txt
echo -e "Updated packages:" >> /tmp/pr.txt
for file in ${CHANGED_PACKAGES}
do
@@ -320,10 +324,10 @@ jobs:
echo -e "##\n- [x] This PR has no manifest .filelist changes. _(Package changes have neither added nor removed files.)_" >> /tmp/pr.txt
fi
echo -e "##\n### Run the following to get this pull request's changes locally for testing.\n\`\`\`bash" >> /tmp/pr.txt
echo -e "CREW_REPO=https://github.com/chromebrew/chromebrew.git CREW_BRANCH=${{ github.ref_name }} crew update \\" >> /tmp/pr.txt
echo -e "CREW_REPO=https://github.com/chromebrew/chromebrew.git CREW_BRANCH=${{ env.BRANCH }} crew update \\" >> /tmp/pr.txt
echo -e "&& yes | crew upgrade\n\`\`\`" >> /tmp/pr.txt
cat /tmp/pr.txt
export PR_NUMBER=$(gh pr create --title "AutoBuild: ${{ github.ref_name }} started at ${TIMESTAMP}" -F /tmp/pr.txt | rev | cut -d"/" -f1 | rev)
export PR_NUMBER=$(gh pr create --title "AutoBuild: ${{ env.BRANCH }} started at ${TIMESTAMP}" -F /tmp/pr.txt | rev | cut -d"/" -f1 | rev)
echo "PR_NUMBER is ${PR_NUMBER}"
echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_ENV
- name: Trigger Unit Test Workflow & Add Reviewer Team