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

Add Ubuntu 24.04 support #303

Merged
merged 1 commit into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .ci-dockerfiles/ubuntu24.04-bootstrap-tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ubuntu:24.04

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
clang \
curl \
git \
libssl-dev \
lsb-release \
make \
&& rm -rf /var/lib/apt/lists/*

RUN git config --global --add safe.directory /__w/ponyup/ponyup
15 changes: 15 additions & 0 deletions .ci-dockerfiles/ubuntu24.04-bootstrap-tester/build-and-push.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -o errexit
set -o nounset

#
# *** You should already be logged in to GHCR when you run this ***
#

TODAY=$(date +%Y%m%d)
DOCKERFILE_DIR="$(dirname "$0")"
DOCKER_TAG="ghcr.io/ponylang/ponyup-ci-ubuntu24.04-bootstrap-tester:${TODAY}"

docker build --pull -t "${DOCKER_TAG}" "${DOCKERFILE_DIR}"
docker push "${DOCKER_TAG}"
10 changes: 10 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ jobs:
- name: Bootstrap test
run: SSL=3.0.x .ci-scripts/test-bootstrap.sh

ubuntu24_04-bootstrap:
name: Ubuntu 24.04 bootstrap
runs-on: ubuntu-latest
container:
image: ghcr.io/ponylang/ponyup-ci-ubuntu24.04-bootstrap-tester:20240425
steps:
- uses: actions/checkout@v4.1.1
- name: Bootstrap test
run: SSL=3.0.x .ci-scripts/test-bootstrap.sh

arm64-macos-bootstrap:
name: arm64 MacOS bootstrap
runs-on: macos-14
Expand Down
3 changes: 3 additions & 0 deletions .release-notes/ubuntu24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Add Ubuntu 24.04 support

We've added support for identifying Ubuntu 24.04 and downloading packages for it. As of the time of this release, no release versions of `ponyc` are available- only nightly versions. Release versions of `ponyc` will be available once a version of `ponyc` post 0.58.3 is released.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Defaults: pic=true

### Platform options

Ponyup is able to detect the CPU architecture and operating system of the platform on which it is running. The `--platform` option is used to override any field in the platform identifier (e.g. `x86_64-linux-ubuntu22.04`).
Ponyup is able to detect the CPU architecture and operating system of the platform on which it is running. The `--platform` option is used to override any field in the platform identifier (e.g. `x86_64-linux-ubuntu24.04`).

### Common Issues

Expand All @@ -133,4 +133,4 @@ Ponyup is able to detect the CPU architecture and operating system of the platfo
error: unexpected selection: ponyc-release-x86_64-unknown-linux
```

This is likely caused by a target triple that does not specify the libc ABI for the platform, as detected by `cc -dumpmachine`. The solution is to manually set the platform identifier using `ponyup default <platform>`, where `<platform>` is a platform identifier such as `x86_64-linux-ubuntu22.04`.
This is likely caused by a target triple that does not specify the libc ABI for the platform, as detected by `cc -dumpmachine`. The solution is to manually set the platform identifier using `ponyup default <platform>`, where `<platform>` is a platform identifier such as `x86_64-linux-ubuntu24.04`.
6 changes: 3 additions & 3 deletions cmd/cli.pony
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ primitive CLI
"Install or update a package",
[ OptionSpec.string(
"platform",
"Specify platform (such as x86_64-linux-ubuntu22.04)",
"Specify platform (such as x86_64-linux-ubuntu24.04)",
None,
"")
],
Expand All @@ -59,7 +59,7 @@ primitive CLI
"Select the default version for a package",
[ OptionSpec.string(
"platform",
"Specify platform (such as x86_64-linux-ubuntu22.04)",
"Specify platform (such as x86_64-linux-ubuntu24.04)",
None,
"")
],
Expand All @@ -68,7 +68,7 @@ primitive CLI
])?
CommandSpec.leaf(
"default",
"Set the default platform (such as x86_64-linux-ubuntu22.04)",
"Set the default platform (such as x86_64-linux-ubuntu24.04)",
[],
[ ArgSpec.string("platform")
])?
Expand Down
2 changes: 1 addition & 1 deletion cmd/packages.pony
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ primitive Packages
It is assumed that Arch field does not contain a `-` character, such as
x86-64 which must be replaced by either x86_64, x64, or amd64. Vendor fields
(unknown, pc, apple, etc.) are ignored. ABI fields are used to detect the
libc implementation (glibc or musl) or distribution (ubuntu22.04) on
libc implementation (glibc or musl) or distribution (ubuntu24.04) on
Linux-based platforms. Such ABI fields are required for Linux for some
packages, such as ponyc.

Expand Down
6 changes: 6 additions & 0 deletions ponyup-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ Linux*)
case $(cc -dumpmachine) in
*gnu)
case "$(lsb_release -d)" in
*"Ubuntu 24.04"*)
platform_triple_distro="ubuntu24.04"
;;
*"Ubuntu 22.04"*)
platform_triple_distro="ubuntu22.04"
;;
Expand All @@ -104,6 +107,9 @@ Linux*)
*"Linux Mint 20"*)
platform_triple_distro="ubuntu20.04"
;;
*"Pop!_OS 24.04"*)
platform_triple_distro="ubuntu24.04"
;;
*"Pop!_OS 22.04"*)
platform_triple_distro="ubuntu22.04"
;;
Expand Down
Loading