cross-platform-actions / action

Cross-platform GitHub action
MIT License
128 stars 19 forks source link

Add support for MIPS64 #43

Open jacob-carlborg opened 1 year ago

Slackadays commented 1 year ago

MIPS seems to be totally deprecated for Linux, so I don't know if it's worth it to include unless you don't plan on supporting MIPS Linux on CPA.

jacob-carlborg commented 1 year ago

i don't plan to support Linux. It's very easy to use Linux on non-x86 architectures using Docker and QEMU.

Slackadays commented 1 year ago

I'm a little confused about this one. I do want to use Linux on non-x86 architectures, but I thought the point of CPA was to make it easy so that we don't have to mess with Docker and QEMU, because the development many of us do often has nothing to do with those. Here's a tutorial of how to do it similar to how you said: https://www.mess.org/2022/01/17/Creating-a-linux-arm64-github-actions-runner/ but that looks like a lot of work to do for every single non-x86 Linux runner I want. If CPA did this hard work once, then that's a lot more effort saved down the line overall for all the users.

jacob-carlborg commented 1 year ago

Here's a tutorial of how to do it similar to how you said: https://www.mess.org/2022/01/17/Creating-a-linux-arm64-github-actions-runner/ but that looks like a lot of work to do for every single non-x86 Linux runner I want. If CPA did this hard work once, then that's a lot more effort saved down the line overall for all the users.

Wow, no. You don't need to do all that. It just takes two lines, more or less:

- uses: docker/setup-qemu-action@v1
- run: |
  docker run \
    --rm \
    -v $(pwd):/${{ github.workspace }} \
    -w ${{ github.workspace }} \
    --platform linux/mips64le \
    debian:latest \
    ./.github/workflows/ci.sh

Here's a full usage example of a workflow that uses both CPA and Docker with QEMU: https://github.com/jacob-carlborg/lime/blob/master/.github/workflows/ci.yml.

I see two reasons to add support for Linux:

With Linux you also get into the trouble of which distributions to support.

But if someone wants to contribute support for Linux I will definitely accept that. If I'm going to add support for Linux it's at the bottom of the priority list. It's just a matter of being smart of how I spend the little time I have to spend on CPA. It's so much I want to do with CPA, just look at the recent enhancement requests. There's also a bunch of internal things I have on my todo list which I have not created GitHub issues for.