diff options
author | Michal Rostecki <vadorovsky@protonmail.com> | 2024-11-12 15:12:01 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-11-12 15:24:00 +0000 |
commit | a46280d73c8eef5fafc705d2b91363ae32b48bcf (patch) | |
tree | c2429e5003ca2cfdca4014b5e481204725f26581 | |
parent | ci: Test crossdev in GitHub Actions (diff) | |
download | crossdev-a46280d73c8eef5fafc705d2b91363ae32b48bcf.tar.gz crossdev-a46280d73c8eef5fafc705d2b91363ae32b48bcf.tar.bz2 crossdev-a46280d73c8eef5fafc705d2b91363ae32b48bcf.zip |
Using `container:` setting in GitHub actions unfortunately doesn't
work with musl-llvm Gentoo images. The reason is that GitHub actions
are injecting a NodeJS binary and for distros other than Alpine, it
injects a binary linked against glibc.[0]
The proper fix would involve either defaulting to musl or making the
libc detection in the container system smarter, but for now, let's just
run the container manually.
[0] https://github.com/actions/runner/blob/6ef5803f24724b77a8d3599a478d06018da5d7c6/src/Runner.Worker/Handlers/StepHost.cs#L143-L172
Signed-off-by: Michal Rostecki <vadorovsky@protonmail.com>
Closes: https://github.com/gentoo/crossdev/pull/27
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | .github/workflows/crossdev.yml | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/.github/workflows/crossdev.yml b/.github/workflows/crossdev.yml index 5af15bb..321bb31 100644 --- a/.github/workflows/crossdev.yml +++ b/.github/workflows/crossdev.yml @@ -22,26 +22,27 @@ jobs: - musl name: crossdev target=${{ matrix.target }} stage3=${{ matrix.stage3 }} runs-on: ubuntu-latest - container: docker.io/gentoo/stage3:${{ matrix.stage3 }} steps: - uses: actions/checkout@v4 - - name: Install dependencies + - name: Create cross environment run: | - emerge --sync --quiet - emerge \ - app-eselect/eselect-repository \ - sys-apps/config-site + docker run -v $(pwd):/workspace -w /workspace \ + docker.io/gentoo/stage3:${{ matrix.stage3 }} bash -c " + # Install dependencies + emerge --sync --quiet + emerge \ + app-eselect/eselect-repository \ + sys-apps/config-site - - name: Install crossdev - run: make install + # Install crossdev + make install - - name: Create cross environment - run: | - eselect repository create crossdev - crossdev ${{ matrix.args }} --target ${{ matrix.target }} + # Create cross environment + eselect repository create crossdev + crossdev ${{ matrix.args }} --target ${{ matrix.target }} - # zstd and its dependencies need both C and C++ toolchain. If any of them - # is broken, the installation will fail. - - name: Sanity check - run: ${{ matrix.target }}-emerge app-arch/zstd + # zstd and its dependencies need both C and C++ toolchain. If any of them + # is broken, the installation will fail. + run: ${{ matrix.target }}-emerge app-arch/zstd + " |