Skip to content

Commit bc59341

Browse files
fix: allow build steps to access timezone (#28510)
## Problem The deprecated attribute linter was failing with timezone database errors: ``` unable to locate share/zoneinfo in the local timezone database at /etc/localtime ``` This was happening because the linter uses `Std.Time.PlainDate.now` to compare dates, which requires timezone information. ## Solution Add `-ro /etc/timezone` to `landrun` shell options. ## Changes - Add timezone permissions to `shell` in `.github/build.in.yml` - Regenerated all build workflow files (`build.yml`, `bors.yml`, `build_fork.yml`) This should fix the deprecated attribute linter failures in CI. Co-authored-by: Kim Morrison <477956+kim-em@users.noreply.github.com> Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
1 parent 4c2ba07 commit bc59341

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/build.in.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
test-outcome: ${{ steps.test.outcome }}
4444
defaults: # On Hoskinson runners, landrun is already installed.
4545
run:
46-
shell: landrun --rox /usr --rw /dev --rox /home/lean/.elan --rox /home/lean/actions-runner/_work --rox /home/lean/.cache/mathlib/ --rw pr-branch/.lake/ --env PATH --env HOME --env GITHUB_OUTPUT -- bash -euxo pipefail {0}
46+
shell: landrun --rox /usr --ro /etc/timezone --rw /dev --rox /home/lean/.elan --rox /home/lean/actions-runner/_work --rox /home/lean/.cache/mathlib/ --rw pr-branch/.lake/ --env PATH --env HOME --env GITHUB_OUTPUT -- bash -euxo pipefail {0}
4747
steps:
4848
- name: cleanup
4949
shell: bash # This *just* deletes old files, so is safe to run outside landrun.

.github/workflows/bors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
test-outcome: ${{ steps.test.outcome }}
5454
defaults: # On Hoskinson runners, landrun is already installed.
5555
run:
56-
shell: landrun --rox /usr --rw /dev --rox /home/lean/.elan --rox /home/lean/actions-runner/_work --rox /home/lean/.cache/mathlib/ --rw pr-branch/.lake/ --env PATH --env HOME --env GITHUB_OUTPUT -- bash -euxo pipefail {0}
56+
shell: landrun --rox /usr --ro /etc/timezone --rw /dev --rox /home/lean/.elan --rox /home/lean/actions-runner/_work --rox /home/lean/.cache/mathlib/ --rw pr-branch/.lake/ --env PATH --env HOME --env GITHUB_OUTPUT -- bash -euxo pipefail {0}
5757
steps:
5858
- name: cleanup
5959
shell: bash # This *just* deletes old files, so is safe to run outside landrun.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
test-outcome: ${{ steps.test.outcome }}
6161
defaults: # On Hoskinson runners, landrun is already installed.
6262
run:
63-
shell: landrun --rox /usr --rw /dev --rox /home/lean/.elan --rox /home/lean/actions-runner/_work --rox /home/lean/.cache/mathlib/ --rw pr-branch/.lake/ --env PATH --env HOME --env GITHUB_OUTPUT -- bash -euxo pipefail {0}
63+
shell: landrun --rox /usr --ro /etc/timezone --rw /dev --rox /home/lean/.elan --rox /home/lean/actions-runner/_work --rox /home/lean/.cache/mathlib/ --rw pr-branch/.lake/ --env PATH --env HOME --env GITHUB_OUTPUT -- bash -euxo pipefail {0}
6464
steps:
6565
- name: cleanup
6666
shell: bash # This *just* deletes old files, so is safe to run outside landrun.

.github/workflows/build_fork.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
test-outcome: ${{ steps.test.outcome }}
5858
defaults: # On Hoskinson runners, landrun is already installed.
5959
run:
60-
shell: landrun --rox /usr --rw /dev --rox /home/lean/.elan --rox /home/lean/actions-runner/_work --rox /home/lean/.cache/mathlib/ --rw pr-branch/.lake/ --env PATH --env HOME --env GITHUB_OUTPUT -- bash -euxo pipefail {0}
60+
shell: landrun --rox /usr --ro /etc/timezone --rw /dev --rox /home/lean/.elan --rox /home/lean/actions-runner/_work --rox /home/lean/.cache/mathlib/ --rw pr-branch/.lake/ --env PATH --env HOME --env GITHUB_OUTPUT -- bash -euxo pipefail {0}
6161
steps:
6262
- name: cleanup
6363
shell: bash # This *just* deletes old files, so is safe to run outside landrun.

0 commit comments

Comments
 (0)