Skip to content

Commit 027fce1

Browse files
authored
Merge branch 'master' into renovate/gazelle-0.x
2 parents 7fb33f5 + a5188b6 commit 027fce1

File tree

34 files changed

+3209
-498
lines changed

34 files changed

+3209
-498
lines changed

.bazelci/presubmit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tasks:
99
ubuntu1804:
1010
bazel: ${{ bazel }}
1111
working_directory: ${{ workdir }}
12-
platform: "ubuntu1804"
12+
platform: "ubuntu2204"
1313
environment:
1414
# haskell base uses the environment locale to decode sockets
1515
LANG: "C.UTF-8"

.bcr/presubmit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
matrix:
22
platform:
33
- debian10
4-
- ubuntu2004
4+
- ubuntu2404
55
- macos
66
- macos_arm64
77
# disable Windows for now, it fails with
@@ -19,7 +19,7 @@ tasks:
1919
- |
2020
if apt --version >/dev/null 2>/dev/null; then
2121
sudo apt update
22-
sudo apt install --no-install-recommends -yy libtinfo5 libgmp-dev
22+
sudo apt install --no-install-recommends -yy libgmp-dev
2323
fi
2424
- |
2525
if xcodebuild -version; then

.github/actions/free_disk_space_on_linux/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ runs:
99
run: |-
1010
sudo swapoff -a
1111
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc "$ANDROID_HOME" /usr/local/.ghcup /usr/local/share/powershell /opt/az /opt/microsoft /etc/skel
12-
docker rmi $(docker images -q) -f
12+
docker images -q | xargs -r docker rmi -f

.github/extract_from_ghc_bindist.py

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
11
import json
22
import os
33
import sys
4+
from packaging import version
45

5-
current_dir = os.path.dirname(__file__)
6-
haskell_dir = os.path.join(current_dir, "..", "haskell")
76

7+
def get_latest_versions(version_list):
8+
# Create a dictionary to store the latest version for each major.minor pair
9+
latest_versions = {}
10+
11+
for ver in version_list:
12+
# Split the version into major, minor, and patch
13+
major, minor, patch = map(int, ver.split('.'))
14+
15+
# Create a key for the major.minor pair
16+
key = f"{major}.{minor}"
17+
18+
# If the key is not in the dictionary or the current version is greater than the stored version
19+
if key not in latest_versions or version.parse(ver) > version.parse(latest_versions[key]):
20+
# Update the dictionary with the latest version
21+
latest_versions[key] = ver
822

9-
def unexpected(unexpected, l, error_message):
10-
for a in unexpected:
11-
if a in l:
12-
print(error_message, file=sys.stderr)
13-
list.remove(a)
23+
# Return the latest versions
24+
return list(latest_versions.values())
1425

1526

27+
current_dir = os.path.dirname(__file__)
28+
haskell_dir = os.path.join(current_dir, "..", "haskell")
29+
1630
with open(
1731
os.path.join(haskell_dir, "private", "ghc_bindist_generated.json"), mode="rb"
1832
) as f:
19-
version_numbers = list(json.load(f).keys())
20-
21-
unexpected(
22-
["8.10.1", "8.10.2"],
23-
version_numbers,
24-
"GHC 8.10.1 and 8.10.2 not supported. Upgrade to 8.10.3 or later.",
25-
)
33+
version_numbers = get_latest_versions(json.load(f).keys())
2634

2735
with open(os.environ["GITHUB_OUTPUT"], mode="a", encoding="utf-8") as output:
2836
output.write("ghc-matrix={}\n".format(version_numbers))

.github/workflows/patch-test.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
jobs:
1414
find-ghc-version:
1515
name: Find GHC versions for which a bindist is provided
16-
runs-on: ubuntu-22.04
16+
runs-on: ubuntu-24.04
1717
outputs:
1818
ghc-matrix: ${{ steps.set-ghc-versions.outputs.ghc-matrix }}
1919
steps:
@@ -30,16 +30,10 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
os: [ubuntu-22.04, macos-13, windows-latest]
33+
os: [ubuntu-24.04, macos-13, windows-2022]
3434
ghc-version: ${{ fromJSON(needs.find-ghc-version.outputs.ghc-matrix) }}
3535
runs-on: ${{ matrix.os }}
3636
steps:
37-
- name: Install required packages
38-
run: |
39-
sudo apt-get update
40-
sudo apt-get install --no-install-recommends -yy libtinfo5
41-
sudo apt-get clean
42-
if: ${{ matrix.os == 'ubuntu-22.04' }}
4337
- uses: actions/checkout@v4
4438
- name: Mount Bazel cache
4539
uses: actions/cache@v4
@@ -68,6 +62,10 @@ jobs:
6862
machine api.github.com
6963
password ${{ secrets.GITHUB_TOKEN }}
7064
EOF
65+
- uses: ./.github/actions/install_apt_pkgs
66+
with:
67+
# some old ghc distributions require libnuma, see https://gitlab.haskell.org/ghc/ghc/-/issues/15688
68+
packages: libnuma-dev
7169
- name: Build & test
7270
shell: bash
7371
run: |

.github/workflows/prepare-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permissions:
1515
jobs:
1616
release:
1717
name: Prepare Release
18-
runs-on: ubuntu-22.04
18+
runs-on: ubuntu-24.04
1919
steps:
2020
- name: Check version
2121
run: |

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
webpage:
1010
name: Update webpage
11-
runs-on: ubuntu-22.04
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4

.github/workflows/update-ghc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
update_ghc:
99
name: GHC ${{ matrix.ghc }} Update
10-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-24.04
1111
strategy:
1212
fail-fast: false
1313
matrix:

.github/workflows/workflow.yaml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ concurrency:
1818
jobs:
1919
lint:
2020
name: Format & Lint
21-
runs-on: ubuntu-22.04
21+
runs-on: ubuntu-24.04
2222
steps:
2323
- uses: actions/checkout@v4
2424
- uses: tweag/configure-bazel-remote-cache-auth@v0
@@ -43,7 +43,7 @@ jobs:
4343
strategy:
4444
fail-fast: false
4545
matrix:
46-
os: [ubuntu-22.04, macos-13]
46+
os: [ubuntu-24.04, macos-13]
4747
module: [rules_haskell, rules_haskell_nix, rules_haskell_tests]
4848
bzlmod: [true, false]
4949
ghc:
@@ -139,7 +139,7 @@ jobs:
139139
strategy:
140140
fail-fast: false
141141
matrix:
142-
os: [ubuntu-22.04, macos-13, windows-latest]
142+
os: [ubuntu-24.04, macos-13, windows-2022]
143143
module: [rules_haskell, rules_haskell_tests]
144144
bzlmod: [true, false]
145145
ghc:
@@ -155,18 +155,15 @@ jobs:
155155
bzlmod: true
156156
# currently proto-lens-protoc (read: protoc-gen-haskell) fails with an access violation on Windows
157157
- ghc: 9.6.5
158-
os: windows-latest
158+
os: windows-2022
159159
- ghc: 9.8.2
160-
os: windows-latest
160+
os: windows-2022
161161
env:
162162
GHC_VERSION: ${{ matrix.ghc }}
163163
runs-on: ${{ matrix.os }}
164164
steps:
165165
- uses: actions/checkout@v4
166166
- uses: ./.github/actions/free_disk_space_on_linux
167-
- uses: ./.github/actions/install_apt_pkgs
168-
with:
169-
packages: libtinfo5
170167
- name: Mount Bazel cache
171168
uses: actions/cache@v4
172169
with:
@@ -257,7 +254,7 @@ jobs:
257254
strategy:
258255
fail-fast: false
259256
matrix:
260-
os: [ubuntu-22.04, macos-13, macos-14, windows-latest]
257+
os: [ubuntu-24.04, macos-13, macos-14, windows-latest]
261258
bzlmod: [true, false]
262259
bazel:
263260
- "6.x"
@@ -272,9 +269,6 @@ jobs:
272269
steps:
273270
- uses: actions/checkout@v4
274271
- uses: ./.github/actions/free_disk_space_on_linux
275-
- uses: ./.github/actions/install_apt_pkgs
276-
with:
277-
packages: libtinfo5
278272
- name: Mount Bazel cache
279273
uses: actions/cache@v4
280274
with:
@@ -332,7 +326,7 @@ jobs:
332326
bazelisk build "//..."
333327
334328
all_ci_tests:
335-
runs-on: ubuntu-22.04
329+
runs-on: ubuntu-24.04
336330
needs:
337331
- lint
338332
- examples-bindist

MODULE.bazel

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ haskell_toolchains = use_extension(
7979
"@rules_haskell//extensions:haskell_toolchains.bzl",
8080
"haskell_toolchains",
8181
)
82-
haskell_toolchains.bindists()
82+
haskell_toolchains.bindists(
83+
dist = {
84+
"linux_amd64": "deb10",
85+
},
86+
)
8387
use_repo(
8488
haskell_toolchains,
8589
"all_bindist_toolchains",

0 commit comments

Comments
 (0)