mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use --locked when building in CI (#31720)
Thus the build will immediately fail if a PR modifies Cargo.toml but forgets to include the changes in Cargo.lock This was previously checked by lockfile_changed.sh after building normally, wasting resources.
This commit is contained in:
parent
ecabdc2583
commit
ea62a5e24f
5 changed files with 4 additions and 19 deletions
2
.github/workflows/android.yml
vendored
2
.github/workflows/android.yml
vendored
|
@ -69,7 +69,7 @@ jobs:
|
|||
env:
|
||||
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
run: |
|
||||
python3 ./mach build --android --target ${{ matrix.arch }} --${{ inputs.profile }}
|
||||
python3 ./mach build --locked --android --target ${{ matrix.arch }} --${{ inputs.profile }}
|
||||
cp -r target/cargo-timings target/cargo-timings-android-${{ matrix.arch }}
|
||||
# TODO: This is disabled since APK crashes during startup.
|
||||
# See https://github.com/servo/servo/issues/31134
|
||||
|
|
4
.github/workflows/linux.yml
vendored
4
.github/workflows/linux.yml
vendored
|
@ -105,7 +105,7 @@ jobs:
|
|||
run: python3 ./mach test-tidy --no-progress --all
|
||||
- name: Build (${{ inputs.profile }})
|
||||
run: |
|
||||
python3 ./mach build --${{ inputs.profile }}
|
||||
python3 ./mach build --locked --${{ inputs.profile }}
|
||||
cp -r target/cargo-timings target/cargo-timings-linux
|
||||
- name: Smoketest
|
||||
run: xvfb-run python3 ./mach smoketest --${{ inputs.profile }}
|
||||
|
@ -124,8 +124,6 @@ jobs:
|
|||
name: cargo-timings-linux
|
||||
# Using a wildcard here ensures that the archive includes the path.
|
||||
path: target/cargo-timings-*
|
||||
- name: Lockfile check
|
||||
run: ./etc/ci/lockfile_changed.sh
|
||||
- name: Build mach package
|
||||
run: python3 ./mach package --${{ inputs.profile }}
|
||||
- name: Upload artifact for mach package
|
||||
|
|
2
.github/workflows/mac.yml
vendored
2
.github/workflows/mac.yml
vendored
|
@ -90,7 +90,7 @@ jobs:
|
|||
brew install gnu-tar
|
||||
- name: Build (${{ inputs.profile }})
|
||||
run: |
|
||||
python3 ./mach build --${{ inputs.profile }}
|
||||
python3 ./mach build --locked --${{ inputs.profile }}
|
||||
cp -r target/cargo-timings target/cargo-timings-macos
|
||||
- name: Smoketest
|
||||
uses: nick-fields/retry@v3
|
||||
|
|
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
|
@ -85,7 +85,7 @@ jobs:
|
|||
"$env:WIX\bin" >> $env:GITHUB_PATH
|
||||
- name: Build (${{ inputs.profile }})
|
||||
run: |
|
||||
python mach build --${{ inputs.profile }}
|
||||
python mach build --locked --${{ inputs.profile }}
|
||||
cp C:\a\servo\servo\target\cargo-timings C:\a\servo\servo\target\cargo-timings-windows -Recurse
|
||||
- name: Copy resources
|
||||
run: cp D:\a\servo\servo\resources C:\a\servo\servo -Recurse
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
diff="$(find . -name 'Cargo.lock' -print0 | xargs -0 git diff)"
|
||||
echo "${diff}"
|
||||
[[ -z "${diff}" ]]
|
Loading…
Add table
Add a link
Reference in a new issue