Skip to content

[rebaseline_tests] Improve commit message for --bump-emsdk. NFC #13938

[rebaseline_tests] Improve commit message for --bump-emsdk. NFC

[rebaseline_tests] Improve commit message for --bump-emsdk. NFC #13938

Workflow file for this run

name: CI
on:
create:
tags:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
archive:
name: Archive
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: make dist
run: |
make dist
version=`cat emscripten-version.txt | sed s/\"//g`
echo "VERSION=$version" >> $GITHUB_ENV
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: emscripten-${{ env.VERSION }}
path: emscripten-${{ env.VERSION }}.tar.bz2
codesize-checks:
name: Codesize Checks
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: true
fetch-depth: 0 # We want access to other branches, specifically `main`
- name: Read emsdk version
id: emsdk_version
run: echo "version=$(cat test/emsdk_version.txt)" >> $GITHUB_OUTPUT
- name: Install emsdk
uses: emscripten-core/setup-emsdk@4528d102f7230f0e7b276855c01ea1159be0e984 # v16
with:
version: ${{ steps.emsdk_version.outputs.version }}
# The version of the emsdk repo that we use here is still not pinned.
# TODO(sbc): Pin (and auto-roll) this revision too.
emsdk-version: main
- name: Set EM_CONFIG
run:
echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV
- name: pip install
run: |
which python3
python3 --version
python3 -m pip install -r requirements-dev.txt
- name: Check test expectations on target branch
# Skip this step for rebaseline PRs, since the target branch is expected
# to be out of date in this case.
if: "!contains(github.event.pull_request.title, 'Automatic rebaseline of codesize expectations')"
env:
BASE_REF: ${{ github.base_ref }}
run: |
echo "Checking out $BASE_REF"
git checkout "$BASE_REF"
git rev-parse HEAD
# Uncomment this like to pull the rebaseline_tests.py from the
# current branch:
# git checkout - ./tools/maint/rebaseline_tests.py
./bootstrap.py
if ! ./tools/maint/rebaseline_tests.py --check-only; then
echo ""
echo "Test expectations are out-of-date on the target branch."
echo "Please run the 'Rebaseline Tests' github action on the target"
echo "branch (normally 'main') before proceeding. You can do this"
echo "from the web UI or from the command line:"
echo ""
echo " gh workflow run rebaseline-tests.yml"
echo ""
echo "You can also run the following command locally and upload"
echo "your own PR:"
echo ""
echo " ./tools/maint/rebaseline_tests.py --new-branch'"
exit 1
fi
- name: Check test expectations on PR branch
env:
GITHUB_REF: ${{ github.ref }}
GITHUB_SHA: ${{ github.sha }}
run: |
echo "Checking out $GITHUB_REF ($GITHUB_SHA)"
# For some reason we cannot pass $GITHUB_REF direclty to git
# since it doesn't recognise it.
git checkout "$GITHUB_SHA"
git rev-parse HEAD
./bootstrap.py
if ! ./tools/maint/rebaseline_tests.py --check-only --clear-cache; then
echo "Test expectations are out-of-date on the PR branch."
echo ""
echo "You can run './tools/maint/rebaseline_tests.py' to"
echo "create a commit updating the expectations."
echo ""
echo "Be sure that you have installed the current emsdk version. See test/emsdk_version.txt ($(cat test/emsdk_version.txt))."
exit 1
fi
clang-format-diff:
# This job is disabled until we can make it more precise
if: false
env:
LLVM_VERSION: 19
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
# Fetch all history for all tags and branches
with:
fetch-depth: 0
- name: Install clang-format
run: |
sudo apt-get install clang-format-19
sudo update-alternatives --install /usr/bin/git-clang-format git-clang-format /usr/bin/git-clang-format-19 100
- run: tools/maint/clang-format-diff.sh origin/$GITHUB_BASE_REF