Skip to content

Update tools/maint/find_unused_settings.py. NFC (#25686) #8005

Update tools/maint/find_unused_settings.py. NFC (#25686)

Update tools/maint/find_unused_settings.py. NFC (#25686) #8005

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@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: make dist
run: |
make dist
version=`cat emscripten-version.txt | sed s/\"//g`
echo "VERSION=$version" >> $GITHUB_ENV
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.5
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@v4
with:
submodules: true
fetch-depth: 0 # We want access to other branches, specifically `main`
- name: pip install
run: |
which python3
python3 --version
python3 -m pip install -r requirements-dev.txt
- name: Install emsdk
run: |
EM_CONFIG=$HOME/emsdk/.emscripten
echo "emscripten config file: $EM_CONFIG"
echo "EM_CONFIG=$EM_CONFIG" >> $GITHUB_ENV
curl -# -L -o ~/emsdk-main.tar.gz https://github.com/emscripten-core/emsdk/archive/main.tar.gz
tar -C ~ -xf ~/emsdk-main.tar.gz
mv ~/emsdk-main ~/emsdk
cd ~/emsdk
./emsdk install tot
./emsdk activate tot
echo "emscripten config file ($EM_CONFIG) contents:"
cat $EM_CONFIG
- 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')"
run: |
echo "Checking out ${{ github.base_ref }}"
git checkout ${{ github.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
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
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
if ! ./tools/maint/rebaseline_tests.py --check-only --clear-cache; then
echo "Test expectations are out-of-date on the PR branch."
echo "You can run './tools/maint/rebaseline_tests.py' to"
echo "create a commit updating the expectations."
echo "Be sure to have 'emsdk install tot' first."
echo "-- This failure is only a warning and can be ignored"
exit 1
fi