-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lint GitHub Actions and Dependabot #126002
Changes from all commits
a61da98
6935bb2
fa940f2
e4033d5
aab2185
d755170
acc74ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -59,7 +59,7 @@ jobs: | |||
with: | ||||
fetch-depth: 1 | ||||
- name: Runner image version | ||||
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV | ||||
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV" | ||||
- name: Check Autoconf and aclocal versions | ||||
run: | | ||||
grep "Generated by GNU Autoconf 2.71" configure | ||||
|
@@ -98,7 +98,7 @@ jobs: | |||
with: | ||||
python-version: '3.x' | ||||
- name: Runner image version | ||||
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV | ||||
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV" | ||||
- name: Restore config.cache | ||||
uses: actions/cache@v4 | ||||
with: | ||||
|
@@ -108,7 +108,7 @@ jobs: | |||
- name: Install Dependencies | ||||
run: sudo ./.github/workflows/posix-deps-apt.sh | ||||
- name: Add ccache to PATH | ||||
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV | ||||
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||||
- name: Configure ccache action | ||||
uses: hendrikmuhs/[email protected] | ||||
with: | ||||
|
@@ -247,7 +247,7 @@ jobs: | |||
steps: | ||||
- uses: actions/checkout@v4 | ||||
- name: Runner image version | ||||
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV | ||||
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV" | ||||
- name: Restore config.cache | ||||
uses: actions/cache@v4 | ||||
with: | ||||
|
@@ -259,9 +259,9 @@ jobs: | |||
run: sudo ./.github/workflows/posix-deps-apt.sh | ||||
- name: Configure OpenSSL env vars | ||||
run: | | ||||
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV | ||||
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV | ||||
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV | ||||
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV" | ||||
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV" | ||||
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV" | ||||
- name: 'Restore OpenSSL build' | ||||
id: cache-openssl | ||||
uses: actions/cache@v4 | ||||
|
@@ -270,16 +270,16 @@ jobs: | |||
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }} | ||||
- name: Install OpenSSL | ||||
if: steps.cache-openssl.outputs.cache-hit != 'true' | ||||
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux | ||||
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux | ||||
- name: Add ccache to PATH | ||||
run: | | ||||
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV | ||||
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||||
- name: Configure ccache action | ||||
uses: hendrikmuhs/[email protected] | ||||
with: | ||||
save: false | ||||
- name: Configure CPython | ||||
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl=$OPENSSL_DIR | ||||
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR" | ||||
- name: Build CPython | ||||
run: make -j4 | ||||
- name: Display build info | ||||
|
@@ -312,9 +312,9 @@ jobs: | |||
run: sudo ./.github/workflows/posix-deps-apt.sh | ||||
- name: Configure OpenSSL env vars | ||||
run: | | ||||
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV | ||||
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV | ||||
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV | ||||
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV" | ||||
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV" | ||||
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV" | ||||
- name: 'Restore OpenSSL build' | ||||
id: cache-openssl | ||||
uses: actions/cache@v4 | ||||
|
@@ -323,24 +323,24 @@ jobs: | |||
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }} | ||||
- name: Install OpenSSL | ||||
if: steps.cache-openssl.outputs.cache-hit != 'true' | ||||
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux | ||||
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux | ||||
- name: Add ccache to PATH | ||||
run: | | ||||
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV | ||||
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||||
- name: Configure ccache action | ||||
uses: hendrikmuhs/[email protected] | ||||
with: | ||||
save: false | ||||
- name: Setup directory envs for out-of-tree builds | ||||
run: | | ||||
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV | ||||
echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV | ||||
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV" | ||||
echo "CPYTHON_BUILDDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-builddir)" >> "$GITHUB_ENV" | ||||
- name: Create directories for read-only out-of-tree builds | ||||
run: mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR | ||||
run: mkdir -p "$CPYTHON_RO_SRCDIR" "$CPYTHON_BUILDDIR" | ||||
- name: Bind mount sources read-only | ||||
run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR | ||||
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR" | ||||
- name: Runner image version | ||||
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV | ||||
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV" | ||||
- name: Restore config.cache | ||||
uses: actions/cache@v4 | ||||
with: | ||||
|
@@ -353,7 +353,7 @@ jobs: | |||
--config-cache \ | ||||
--with-pydebug \ | ||||
--enable-slower-safety \ | ||||
--with-openssl=$OPENSSL_DIR | ||||
--with-openssl="$OPENSSL_DIR" | ||||
- name: Build CPython out-of-tree | ||||
working-directory: ${{ env.CPYTHON_BUILDDIR }} | ||||
run: make -j4 | ||||
|
@@ -362,18 +362,18 @@ jobs: | |||
run: make pythoninfo | ||||
- name: Remount sources writable for tests | ||||
# some tests write to srcdir, lack of pyc files slows down testing | ||||
run: sudo mount $CPYTHON_RO_SRCDIR -oremount,rw | ||||
run: sudo mount "$CPYTHON_RO_SRCDIR" -oremount,rw | ||||
- name: Setup directory envs for out-of-tree builds | ||||
run: | | ||||
echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV | ||||
echo "CPYTHON_BUILDDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-builddir)" >> "$GITHUB_ENV" | ||||
- name: "Create hypothesis venv" | ||||
working-directory: ${{ env.CPYTHON_BUILDDIR }} | ||||
run: | | ||||
VENV_LOC=$(realpath -m .)/hypovenv | ||||
VENV_PYTHON=$VENV_LOC/bin/python | ||||
echo "HYPOVENV=${VENV_LOC}" >> $GITHUB_ENV | ||||
echo "VENV_PYTHON=${VENV_PYTHON}" >> $GITHUB_ENV | ||||
./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r ${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt | ||||
echo "HYPOVENV=${VENV_LOC}" >> "$GITHUB_ENV" | ||||
echo "VENV_PYTHON=${VENV_PYTHON}" >> "$GITHUB_ENV" | ||||
./python -m venv "$VENV_LOC" && "$VENV_PYTHON" -m pip install -r "${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt" | ||||
- name: 'Restore Hypothesis database' | ||||
id: cache-hypothesis-database | ||||
uses: actions/cache@v4 | ||||
|
@@ -411,18 +411,21 @@ jobs: | |||
|
||||
build_asan: | ||||
name: 'Address sanitizer' | ||||
runs-on: ubuntu-22.04 | ||||
runs-on: ${{ matrix.os }} | ||||
timeout-minutes: 60 | ||||
needs: check_source | ||||
if: needs.check_source.outputs.run_tests == 'true' | ||||
strategy: | ||||
matrix: | ||||
os: [ubuntu-22.04] | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The change itself looks ok, but I was wondering if it was just for consistency or if there is another reason. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's because on cpython/.github/workflows/build.yml Line 449 in c5b99f5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's right. This was added in #124403, where we replaced In that PR, you can see we added See also #123699 (comment) for more background, cc @zware. |
||||
env: | ||||
OPENSSL_VER: 3.0.15 | ||||
PYTHONSTRICTEXTENSIONBUILD: 1 | ||||
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0 | ||||
steps: | ||||
- uses: actions/checkout@v4 | ||||
- name: Runner image version | ||||
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV | ||||
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV" | ||||
- name: Restore config.cache | ||||
uses: actions/cache@v4 | ||||
with: | ||||
|
@@ -438,9 +441,9 @@ jobs: | |||
version: 10 | ||||
- name: Configure OpenSSL env vars | ||||
run: | | ||||
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV | ||||
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV | ||||
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV | ||||
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV" | ||||
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV" | ||||
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV" | ||||
- name: 'Restore OpenSSL build' | ||||
id: cache-openssl | ||||
uses: actions/cache@v4 | ||||
|
@@ -449,10 +452,10 @@ jobs: | |||
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }} | ||||
- name: Install OpenSSL | ||||
if: steps.cache-openssl.outputs.cache-hit != 'true' | ||||
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux | ||||
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux | ||||
- name: Add ccache to PATH | ||||
run: | | ||||
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV | ||||
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||||
- name: Configure ccache action | ||||
uses: hendrikmuhs/[email protected] | ||||
with: | ||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Runner image version | ||
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV | ||
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV" | ||
- name: Restore config.cache | ||
uses: actions/cache@v4 | ||
with: | ||
|
@@ -47,12 +47,12 @@ jobs: | |
sudo sysctl -w vm.mmap_rnd_bits=28 | ||
- name: TSAN Option Setup | ||
run: | | ||
echo "TSAN_OPTIONS=log_path=${GITHUB_WORKSPACE}/tsan_log suppressions=${GITHUB_WORKSPACE}/${{ inputs.suppressions_path }} handle_segv=0" >> $GITHUB_ENV | ||
echo "CC=clang" >> $GITHUB_ENV | ||
echo "CXX=clang++" >> $GITHUB_ENV | ||
echo "TSAN_OPTIONS=log_path=${GITHUB_WORKSPACE}/tsan_log suppressions=${GITHUB_WORKSPACE}/${{ inputs.suppressions_path }} handle_segv=0" >> "$GITHUB_ENV" | ||
echo "CC=clang" >> "$GITHUB_ENV" | ||
echo "CXX=clang++" >> "$GITHUB_ENV" | ||
- name: Add ccache to PATH | ||
run: | | ||
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV | ||
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||
- name: Configure ccache action | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
|
@@ -68,7 +68,7 @@ jobs: | |
run: ./python -m test --tsan -j4 | ||
- name: Display TSAN logs | ||
if: always() | ||
run: find ${GITHUB_WORKSPACE} -name 'tsan_log.*' | xargs head -n 1000 | ||
run: find "${GITHUB_WORKSPACE}" -name 'tsan_log.*' | xargs head -n 1000 | ||
- name: Archive TSAN logs | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,9 +34,9 @@ jobs: | |
run: sudo ./.github/workflows/posix-deps-apt.sh | ||
- name: Configure OpenSSL env vars | ||
run: | | ||
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV | ||
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV | ||
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV | ||
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV" | ||
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV" | ||
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV" | ||
- name: 'Restore OpenSSL build' | ||
id: cache-openssl | ||
uses: actions/cache@v4 | ||
|
@@ -45,25 +45,25 @@ jobs: | |
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }} | ||
- name: Install OpenSSL | ||
if: steps.cache-openssl.outputs.cache-hit != 'true' | ||
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux | ||
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux | ||
- name: Add ccache to PATH | ||
run: | | ||
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV | ||
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||
- name: Configure ccache action | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
save: ${{ github.event_name == 'push' }} | ||
max-size: "200M" | ||
- name: Setup directory envs for out-of-tree builds | ||
run: | | ||
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV | ||
echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV | ||
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same question as above for this and the following line There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same answer :) |
||
echo "CPYTHON_BUILDDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-builddir)" >> "$GITHUB_ENV" | ||
- name: Create directories for read-only out-of-tree builds | ||
run: mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR | ||
run: mkdir -p "$CPYTHON_RO_SRCDIR" "$CPYTHON_BUILDDIR" | ||
- name: Bind mount sources read-only | ||
run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR | ||
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR" | ||
- name: Runner image version | ||
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV | ||
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV" | ||
- name: Restore config.cache | ||
uses: actions/cache@v4 | ||
with: | ||
|
@@ -77,7 +77,7 @@ jobs: | |
--with-pydebug | ||
--enable-slower-safety | ||
--enable-safety | ||
--with-openssl=$OPENSSL_DIR | ||
--with-openssl="$OPENSSL_DIR" | ||
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }} | ||
- name: Build CPython out-of-tree | ||
if: ${{ inputs.free-threading }} | ||
|
@@ -95,14 +95,14 @@ jobs: | |
run: >- | ||
python Tools/build/check_warnings.py | ||
--compiler-output-file-path=${{ env.CPYTHON_BUILDDIR }}/compiler_output_ubuntu.txt | ||
--warning-ignore-file-path ${GITHUB_WORKSPACE}/Tools/build/.warningignore_ubuntu | ||
--warning-ignore-file-path "${GITHUB_WORKSPACE}/Tools/build/.warningignore_ubuntu" | ||
--compiler-output-type=gcc | ||
--fail-on-regression | ||
--fail-on-improvement | ||
--path-prefix="../cpython-ro-srcdir/" | ||
- name: Remount sources writable for tests | ||
# some tests write to srcdir, lack of pyc files slows down testing | ||
run: sudo mount $CPYTHON_RO_SRCDIR -oremount,rw | ||
run: sudo mount "$CPYTHON_RO_SRCDIR" -oremount,rw | ||
- name: Tests | ||
working-directory: ${{ env.CPYTHON_BUILDDIR }} | ||
run: xvfb-run make test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need different quotes here for the nested strings?
Or just skip this one, since it's already inside double quotes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's this warning:
Looking up the code: https://www.shellcheck.net/wiki/SC2086
This applies:
That would trigger this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh. It looks strange to me, but I'll trust you that this is the right thing to do!