Skip to content
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

Prepare release 2.5.0.0 #3879

Merged
merged 10 commits into from
Dec 12, 2023
Merged

Prepare release 2.5.0.0 #3879

merged 10 commits into from
Dec 12, 2023

Conversation

wz1000
Copy link
Collaborator

@wz1000 wz1000 commented Nov 21, 2023

Release checklist

  • check ghcup supports new GHC releases if any
  • set the supported GHCs in workflow file .github/workflows/release.yaml
    • There is currently a list of GHC versions for each major platform. Search for ghc: [ to find all lists.
    • Look for TODO: to find locations that require extra care for GHC versions.
  • check all plugins still work if release includes code changes
  • bump package versions in all *.cabal files (same version as hls)
    • HLS uses lockstep versioning. The core packages and all plugins use the same version number, and only support exactly this version.
      • Exceptions:
        • hie-compat requires no automatic version bump.
        • shake-bench is an internal testing tool, not exposed to the outside world. Thus, no version bump required for releases.
    • For updating cabal files, the following script can be used:
      • # Update all `version:` fields
        sed -ri "s/^version:( +)2.2.0.0/version:\12.3.0.0/" **/*.cabal
        # Update all constraints expected to be in the form `== <version>`.
        # We usually don't force an exact version, so this is relatively unambiguous.
        # We could introduce some more ad-hoc parsing, if there is still ambiguity.
        sed -ri "s/== 2.2.0.0/== 2.3.0.0/" **/*.cabal
      • It still requires manual verification and review
  • generate and update changelog
    • Generate a ChangeLog via ./GenChangelogs.hs <api-key> <tag>
  • create release branch as wip/<version>
    • git switch -c wip/<version>
  • create release tag as <version>
    • git tag <version>
  • trigger release pipeline by pushing the tag
    • this creates a draft release
    • git push <remote> <version>
  • run sh scripts/release/download-gh-artifacts.sh <version> <your-gpg-email>
    • downloads artifacts to gh-release-artifacts/haskell-language-server-<version>/
    • also downloads FreeBSD bindist from circle CI
    • adds signatures
  • upload artifacts to downloads.haskell.org from gh-release-artifacts/haskell-language-server-<version>/
    • You require sftp access, contact wz1000, bgamari or chreekat
    • cd gh-release-artifacts/haskell-language-server-<version>
    • SIGNING_KEY=... ../../release/upload.sh upload
      • Your SIGNING_KEY can be obtained with gpg --list-secret-keys --keyid-format=long
    • Afterwards, the artifacts are available at: https://downloads.haskell.org/~hls/haskell-language-server-<version>/
    • Run SIGNING_KEY=... ../../release/upload.sh purge_all to remove CDN caches
  • create PR to ghcup-metadata
    • update ghcup-0.0.7.yaml and ghcup-vanilla-0.0.7.yaml
      • can use sh scripts/release/create-yaml-snippet.sh <version> to generate a snippet that can be manually inserted into the yaml files
    • update hls-metadata-0.0.1.json
      • utilize cabal run ghcup-gen -- generate-hls-ghcs -f ghcup-0.0.7.yaml --format json --stdout in the root of ghcup-metadata repository
    • Be sure to mark the correct latest version and add the 'recommended' tag to the latest release.
  • get sign-off on release
    • from wz1000, michealpj, maerwald and fendor
  • publish release on github
  • upload hackage packages
    • requires credentials
  • update https://haskell-language-server.readthedocs.io/en/latest/support/ghc-version-support.html#current-ghc-version-support-status
  • Supported tools table needs to be updated:
  • post release on discourse and reddit
  • merge release PR to master or forward port relevant changes

wz1000 and others added 6 commits December 1, 2023 19:11
(cherry picked from commit 6236a51)
We use `clang` from brew's llvm, and that just fails horribly on Sonoma. 13 seems to work, though we might want to consider to just go with `llvm`. Instead of some ancient pinned version.

With GHC 9.2+ we have the NCG, and don't even need to rely on llvm at all anymore, we could just drop this outright. And use the Apple CLT provided $CC and others.
missed that in the previous commit.
@hasufell
Copy link
Member

hasufell commented Dec 1, 2023

Just a note to release management: Cirrus CI did not refuse to start. Quite the contrary. It allows to run ad-hoc jobs against existing branches with a custom .cirrus.yml which you paste into the web-interface. So you don't even need to push new commits to the release branch.

I pasted the following contents:

# release CI for FreeBSD
compute_engine_instance:
  image_project: freebsd-org-cloud-dev
  image: family/freebsd-13-1
  platform: freebsd
  disk: 100 # Gb

build_task:
  timeout_in: 120m
  env:
    AWS_ACCESS_KEY_ID: ENCRYPTED[dc5896620ebc12e98e6bbe96f72c5a2fe3785f439b7b2346797355f8d329a4bfd8ef6e58086bfc014be0d914424101cd]
    AWS_SECRET_ACCESS_KEY: ENCRYPTED[6501cd594aca08c6c67cc679dd6f6d30db0cd44a81cceddebf32bb3d0a37f9af19cd71ddb7169d3f7b284a7829969f9e]
    S3_HOST: ENCRYPTED[d3fef1b5850e85d80dd1684370b53183df2218f2d36509108a2703371afd9ebd3f9596ad4de52487c15ea29baed606b7]
    TARBALL_EXT: "tar.xz"
    ARCH: 64
    ARTIFACT: "x86_64-freebsd"
    DISTRO: "na"
    RUNNER_OS: "FreeBSD"
    ADD_CABAL_ARGS: "--enable-split-sections"
    GITHUB_WORKSPACE: ${CIRRUS_WORKING_DIR}
    CABAL_CACHE_NONFATAL: "yes"
  matrix:
    - name: build-ghc-9.2.8
      env:
        GHC_VERSION: 9.2.8
    - name: build-ghc-9.4.8
      env:
        GHC_VERSION: 9.4.8
    - name: build-ghc-9.6.3
      env:
        GHC_VERSION: 9.6.3
    - name: build-ghc-9.8.1
      env:
        GHC_VERSION: 9.8.1
  install_script: pkg install -y hs-cabal-install git bash misc/compat10x misc/compat11x misc/compat12x gmake patchelf tree gmp libiconv
  script:
    - tzsetup Etc/GMT
    - adjkerntz -a
    - bash .github/scripts/build.sh
    - tar caf out.tar.xz out/ store/
  binaries_artifacts:
    path: "out.tar.xz"


bindist_task:
  name: bindist
  depends_on:
    - build-ghc-9.2.8
    - build-ghc-9.4.8
    - build-ghc-9.6.3
    - build-ghc-9.8.1
  timeout_in: 120m
  env:
    TARBALL_EXT: "tar.xz"
    ARCH: 64
    ARTIFACT: "x86_64-freebsd"
    DISTRO: "na"
    RUNNER_OS: "FreeBSD"
    GITHUB_WORKSPACE: ${CIRRUS_WORKING_DIR}
  install_script: pkg install -y hs-cabal-install git bash misc/compat10x misc/compat11x misc/compat12x gmake patchelf tree gmp libiconv unzip
  script:
    - tzsetup Etc/GMT
    - adjkerntz -a

    - curl -o binaries-9.2.8.tar.xz -L https://api.cirrus-ci.com/v1/artifact/build/${CIRRUS_BUILD_ID}/build-ghc-9.2.8/binaries/out.tar.xz
    - tar xvf binaries-9.2.8.tar.xz
    - rm -f binaries-9.2.8.tar.xz

    - curl -o binaries-9.4.8.tar.xz -L https://api.cirrus-ci.com/v1/artifact/build/${CIRRUS_BUILD_ID}/build-ghc-9.4.8/binaries/out.tar.xz
    - tar xvf binaries-9.4.8.tar.xz
    - rm -f binaries-9.4.8.tar.xz

    - curl -o binaries-9.6.3.tar.xz -L https://api.cirrus-ci.com/v1/artifact/build/${CIRRUS_BUILD_ID}/build-ghc-9.6.3/binaries/out.tar.xz
    - tar xvf binaries-9.6.3.tar.xz
    - rm -f binaries-9.6.3.tar.xz

    - curl -o binaries-9.8.1.tar.xz -L https://api.cirrus-ci.com/v1/artifact/build/${CIRRUS_BUILD_ID}/build-ghc-9.8.1/binaries/out.tar.xz
    - tar xvf binaries-9.8.1.tar.xz
    - rm -f binaries-9.8.1.tar.xz

    - bash .github/scripts/bindist.sh
  bindist_artifacts:
    path: "./out/*.tar.xz"

test_task:
  name: test
  depends_on:
    - bindist
  timeout_in: 120m
  env:
    TARBALL_EXT: "tar.xz"
    ARCH: 64
    ARTIFACT: "x86_64-freebsd"
    DISTRO: "na"
    RUNNER_OS: "FreeBSD"
    GITHUB_WORKSPACE: ${CIRRUS_WORKING_DIR}
  install_script: pkg install -y hs-cabal-install git bash misc/compat10x misc/compat11x misc/compat12x gmake patchelf tree gmp libiconv unzip
  script:
    - tzsetup Etc/GMT
    - adjkerntz -a

    - curl -O -L https://api.cirrus-ci.com/v1/artifact/build/${CIRRUS_BUILD_ID}/bindist/bindist.zip
    - unzip bindist.zip

    - bash .github/scripts/test.sh

Removing only_if: $CIRRUS_TAG != '' and adding the new GHC versions. That was it.

https://cirrus-ci.com/build/6662785002635264

@hasufell
Copy link
Member

hasufell commented Dec 2, 2023

Going forward, ghcup will fork the HLS CI and produce its own bindists.

However, the vanilla ghcup metadata files will still be up to upstream to maintain.

@wz1000 wz1000 enabled auto-merge (rebase) December 5, 2023 11:58
@wz1000 wz1000 added the merge me Label to trigger pull request merge label Dec 11, 2023
@wz1000 wz1000 merged commit 201b604 into master Dec 12, 2023
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants