Skip to content

Reorganize platform detection and support Alpine amd64#80

Closed
trekdemo wants to merge 2 commits intoankane:masterfrom
trekdemo:organize-supported-distros
Closed

Reorganize platform detection and support Alpine amd64#80
trekdemo wants to merge 2 commits intoankane:masterfrom
trekdemo:organize-supported-distros

Conversation

@trekdemo
Copy link
Copy Markdown

@trekdemo trekdemo commented Apr 1, 2026

Replace the if/elsif chain for supported OS/distro resolution with a declarative platforms hash, making it easy to see at a glance which operating systems and distributions are supported:
The second commit, adds support for Alpine on amd64.

  • macOS (x86_64, ARM)
  • Debian 11, 12 (amd64)
  • Ubuntu 20.04, 22.04, 24.04 (amd64)
  • Arch Linux (amd64)
  • Alpine (amd64) 🆕

I'm really happy I found your gem because it made it easy to use or-tools in my Rails app. Small hiccup, the app runs in Docker on Alpine Linux. There's official support for amd64, and I'm working on the arm64 support. I'd like to add support for them in the near future.

@trekdemo trekdemo marked this pull request as draft April 1, 2026 13:42
trekdemo added 2 commits April 1, 2026 16:35
Replace the if/elsif chain for supported OS/distro resolution with a
declarative platforms hash, making it easy to see at a glance which
operating systems and distributions are supported:

  - macOS (x86_64, ARM)
  - Debian 11, 12 (amd64)
  - Ubuntu 20.04, 22.04, 24.04 (amd64)
  - Arch Linux (amd64)

Extract OS detection into a dedicated `detect_os` method that returns
a consistent [os, version, arm?] tuple used as the lookup key.

Look up nil version as a wild-card value

When a binaries support multiple versions of the OS, use `nil` as the
value and during lookup. This also means that the binaries are not
version specific on the given OS.
@trekdemo trekdemo force-pushed the organize-supported-distros branch from acab1ca to 3735ea4 Compare April 1, 2026 14:35
@trekdemo trekdemo changed the title Reorganize platform detection into a lookup table Reorganize platform detection and support Alpine amd64 Apr 2, 2026
@ankane
Copy link
Copy Markdown
Owner

ankane commented Apr 8, 2026

Hi @trekdemo, thanks for the PR. It looks like the build uses alpine:edge, which I don't believe is guaranteed to work with other versions of Alpine (even if it currently does).

@ankane ankane closed this Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants