diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml index ec12fd0..773ec6f 100644 --- a/.github/workflows/base.yml +++ b/.github/workflows/base.yml @@ -6,9 +6,9 @@ permissions: on: # pull_request: push: - # branches: + branches: # - main - # - dev + - dev tags: - 'base-[0-9]+-[0-9]+-[0-9]+' schedule: @@ -29,59 +29,60 @@ jobs: fail-fast: false matrix: include: - # Linux (musl) - - target: aarch64-unknown-linux-musl - - target: arm-unknown-linux-musleabi - - target: arm-unknown-linux-musleabihf - - target: armv5te-unknown-linux-musleabi - - target: armv7-unknown-linux-musleabi - - target: armv7-unknown-linux-musleabihf - - target: hexagon-unknown-linux-musl # tier3 - - target: i586-unknown-linux-musl - - target: i686-unknown-linux-musl - # - target: loongarch64-unknown-linux-musl # tier3, musl-cross-make doesn't support this target - - target: mips-unknown-linux-musl # tier3 - - target: mips64-unknown-linux-muslabi64 # tier3 - - target: mips64el-unknown-linux-muslabi64 # tier3 - - target: mipsel-unknown-linux-musl # tier3 - - target: powerpc-unknown-linux-musl # tier3 - - target: powerpc64-unknown-linux-musl # tier3 - - target: powerpc64le-unknown-linux-musl # tier3 - - target: riscv32gc-unknown-linux-musl # tier3 - - target: riscv64gc-unknown-linux-musl # tier3 - - target: s390x-unknown-linux-musl # tier3 - - target: thumbv7neon-unknown-linux-musleabihf # tier3 - - target: x86_64-unknown-linux-musl + # # Linux (musl) + # - target: aarch64-unknown-linux-musl + # - target: arm-unknown-linux-musleabi + # - target: arm-unknown-linux-musleabihf + # - target: armv5te-unknown-linux-musleabi + # - target: armv7-unknown-linux-musleabi + # - target: armv7-unknown-linux-musleabihf + # - target: hexagon-unknown-linux-musl # tier3 + # - target: i586-unknown-linux-musl + # - target: i686-unknown-linux-musl + # # - target: loongarch64-unknown-linux-musl # musl-cross-make doesn't support this target + # - target: mips-unknown-linux-musl # tier3 + # - target: mips64-unknown-linux-muslabi64 # tier3 + # - target: mips64el-unknown-linux-muslabi64 # tier3 + # - target: mipsel-unknown-linux-musl # tier3 + # - target: powerpc-unknown-linux-musl # tier3 + - target: powerpc-unknown-linux-muslspe # tier3 + # - target: powerpc64-unknown-linux-musl # tier3 + # - target: powerpc64le-unknown-linux-musl # tier3 + # - target: riscv32gc-unknown-linux-musl # tier3 + # - target: riscv64gc-unknown-linux-musl + # - target: s390x-unknown-linux-musl # tier3 + # - target: thumbv7neon-unknown-linux-musleabihf # tier3 + # - target: x86_64-unknown-linux-musl - # NetBSD - - target: aarch64-unknown-netbsd # tier3 - - target: aarch64_be-unknown-netbsd # tier3 - - target: armv6-unknown-netbsd-eabihf # tier3 - - target: armv7-unknown-netbsd-eabihf # tier3 - - target: i586-unknown-netbsd # tier3 - - target: i686-unknown-netbsd # tier3 - - target: mipsel-unknown-netbsd # tier3 - - target: powerpc-unknown-netbsd # tier3 - - target: sparc64-unknown-netbsd # tier3 - - target: x86_64-unknown-netbsd + # # NetBSD + # - target: aarch64-unknown-netbsd # tier3 + # - target: aarch64_be-unknown-netbsd # tier3 + # - target: armv6-unknown-netbsd-eabihf # tier3 + # - target: armv7-unknown-netbsd-eabihf # tier3 + # - target: i586-unknown-netbsd # tier3 + # - target: i686-unknown-netbsd # tier3 + # - target: mipsel-unknown-netbsd # tier3 + # - target: powerpc-unknown-netbsd # tier3 + # - target: sparc64-unknown-netbsd # tier3 + # - target: x86_64-unknown-netbsd - # Solaris - - target: sparcv9-sun-solaris - - target: x86_64-pc-solaris + # # Solaris + # - target: sparcv9-sun-solaris + # - target: x86_64-pc-solaris - # illumos - - target: x86_64-unknown-illumos + # # illumos + # - target: x86_64-unknown-illumos - # Windows (MinGW) - - target: i686-pc-windows-gnu - - target: x86_64-pc-windows-gnu - - target: x86_64-pc-windows-gnu - host: aarch64 + # # Windows (MinGW) + # - target: i686-pc-windows-gnu + # - target: x86_64-pc-windows-gnu + # - target: x86_64-pc-windows-gnu + # host: aarch64 - # Misc - - target: various - - target: various - host: aarch64 + # # Misc + # - target: various + # - target: various + # host: aarch64 runs-on: ubuntu-latest timeout-minutes: 120 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9c2499..2faf947 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: push: branches: - main - - dev + # - dev tags: - '[0-9]+-[0-9]+-[0-9]+' schedule: @@ -24,43 +24,43 @@ concurrency: cancel-in-progress: true jobs: - tidy: - uses: taiki-e/github-actions/.github/workflows/tidy.yml@main + # tidy: + # uses: taiki-e/github-actions/.github/workflows/tidy.yml@main build: - needs: tidy + # needs: tidy strategy: fail-fast: false matrix: include: - - target: linux-gnu - - target: linux-gnu - host: aarch64 - # TODO(linux-musl): https://github.com/rust-lang/rust/pull/107129/ - # - target: linux-musl - # musl: '1.1' + # - target: linux-gnu + # - target: linux-gnu + # host: aarch64 + # # TODO(linux-musl): https://github.com/rust-lang/rust/pull/107129/ + # # - target: linux-musl + # # musl: '1.1' - target: linux-musl musl: '1.2' - - target: linux-uclibc - - target: android - - target: freebsd - - target: netbsd - - target: openbsd - - target: dragonfly - - target: solaris - - target: illumos - - target: redox - # - target: fuchsia - - target: wasi - - target: wasi - host: aarch64 - # - target: emscripten # TODO: wasm-ld: error: /tmp/test-emcc/rust/target/wasm32-unknown-emscripten/debug/deps/rust_test.216hq58untngdnb12cddqxyyf.rcgu.o: Invalid symbol type - - target: windows-gnu - - target: windows-gnu - host: aarch64 - - target: none - - target: none - host: aarch64 + # - target: linux-uclibc + # - target: android + # - target: freebsd + # - target: netbsd + # - target: openbsd + # - target: dragonfly + # - target: solaris + # - target: illumos + # - target: redox + # # - target: fuchsia + # - target: wasi + # - target: wasi + # host: aarch64 + # # - target: emscripten # TODO: wasm-ld: error: /tmp/test-emcc/rust/target/wasm32-unknown-emscripten/debug/deps/rust_test.216hq58untngdnb12cddqxyyf.rcgu.o: Invalid symbol type + # - target: windows-gnu + # - target: windows-gnu + # host: aarch64 + # - target: none + # - target: none + # host: aarch64 runs-on: ubuntu-latest timeout-minutes: 150 permissions: @@ -79,50 +79,50 @@ jobs: HOST_ARCH: ${{ matrix.host }} MUSL_VERSION: ${{ matrix.musl }} - manifest: - if: github.repository_owner == 'taiki-e' && github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) - needs: build - runs-on: ubuntu-latest - timeout-minutes: 60 - permissions: - contents: read - packages: write - steps: - - uses: taiki-e/checkout-action@v1 - - run: | - echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin - echo "PUSH_TO_GHCR=1" >>"${GITHUB_ENV}" - if: github.repository_owner == 'taiki-e' && (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') - - run: tools/docker-manifest.sh + # manifest: + # if: github.repository_owner == 'taiki-e' && github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) + # needs: build + # runs-on: ubuntu-latest + # timeout-minutes: 60 + # permissions: + # contents: read + # packages: write + # steps: + # - uses: taiki-e/checkout-action@v1 + # - run: | + # echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin + # echo "PUSH_TO_GHCR=1" >>"${GITHUB_ENV}" + # if: github.repository_owner == 'taiki-e' && (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') + # - run: tools/docker-manifest.sh - codegen: - runs-on: ubuntu-latest - timeout-minutes: 60 - permissions: - contents: read - pull-requests: write # for gh pr edit --add-assignee - repository-projects: read # for gh pr edit --add-assignee - steps: - - uses: taiki-e/checkout-action@v1 - - name: Install Rust - run: rustup toolchain add nightly --no-self-update && rustup default nightly - - run: tools/gen.sh - - id: diff - run: tools/ci/gen.sh - if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') - - id: create-pull-request - uses: peter-evans/create-pull-request@v7 - with: - title: Update generated code - body: | - Auto-generated by CI using [create-pull-request](https://github.com/peter-evans/create-pull-request). - branch: update-generated-code - token: ${{ secrets.CREATE_PR_TOKEN }} - if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' - - name: Notify PR author by assigning PR - run: gh pr edit --add-assignee taiki-e "${PR_NUMBER:?}" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }} - if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' - - run: git add -N . && git diff --exit-code + # codegen: + # runs-on: ubuntu-latest + # timeout-minutes: 60 + # permissions: + # contents: read + # pull-requests: write # for gh pr edit --add-assignee + # repository-projects: read # for gh pr edit --add-assignee + # steps: + # - uses: taiki-e/checkout-action@v1 + # - name: Install Rust + # run: rustup toolchain add nightly --no-self-update && rustup default nightly + # - run: tools/gen.sh + # - id: diff + # run: tools/ci/gen.sh + # if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') + # - id: create-pull-request + # uses: peter-evans/create-pull-request@v7 + # with: + # title: Update generated code + # body: | + # Auto-generated by CI using [create-pull-request](https://github.com/peter-evans/create-pull-request). + # branch: update-generated-code + # token: ${{ secrets.CREATE_PR_TOKEN }} + # if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' + # - name: Notify PR author by assigning PR + # run: gh pr edit --add-assignee taiki-e "${PR_NUMBER:?}" + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }} + # if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' + # - run: git add -N . && git diff --exit-code diff --git a/README.md b/README.md index 9258f81..a49e00b 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ See also [setup-cross-toolchain-action](https://github.com/taiki-e/setup-cross-t | ---- | --- | ----- | --- | ---- | ---- | | musl 1.2.3 [6] | 9.4.0 [1] | [2] | ✓ (libstdc++) [1] | ✓ (qemu) [3] [4] | [5] | -[1] 13.2.0 for risc64gc-unknown-linux-musl, unavailable for hexagon-unknown-linux-musl
+[1] 8.5.0 for powerpc-unknown-linux-muslspe, 13.2.0 for risc64gc-unknown-linux-musl, unavailable for hexagon-unknown-linux-musl
[2] 17.0.0-rc3 for hexagon-unknown-linux-musl, otherwise host
[3] hexagon-unknown-linux-musl requires release mode for building test
[4] Except for riscv32gc-unknown-linux-musl
@@ -108,6 +108,7 @@ See also [setup-cross-toolchain-action](https://github.com/taiki-e/setup-cross-t | `mips64el-unknown-linux-muslabi64` (tier3) | x86_64 Linux (any libc) | | `mipsel-unknown-linux-musl` (tier3) | x86_64 Linux (any libc) | | `powerpc-unknown-linux-musl` (tier3) | x86_64 Linux (any libc) | +| `powerpc-unknown-linux-muslspe` (tier3) | x86_64 Linux (any libc) | | `powerpc64le-unknown-linux-musl` (tier3) | x86_64 Linux (any libc) | | `riscv32gc-unknown-linux-musl` (tier3) | x86_64 Linux (any libc) | | `riscv64gc-unknown-linux-musl` | x86_64 Linux (any libc) | diff --git a/docker/base/linux-musl.Dockerfile b/docker/base/linux-musl.Dockerfile index 712cb32..89f53d6 100644 --- a/docker/base/linux-musl.Dockerfile +++ b/docker/base/linux-musl.Dockerfile @@ -11,8 +11,8 @@ # Use the fork that contains a patch to fix CVE-2020-28928 for musl 1.1 and add some hashes for riscv. # https://github.com/taiki-e/musl-cross-make/tree/dev ARG MUSL_CROSS_MAKE_REV=060a2763225cbc325cffce7e7e08e62a7df1ad3b -# Available versions: https://github.com/richfelker/musl-cross-make/tree/HEAD/hashes -# Default: https://github.com/richfelker/musl-cross-make/blob/HEAD/Makefile +# Available versions: https://github.com/taiki-e/musl-cross-make/tree/dev/hashes +# Default: https://github.com/taiki-e/musl-cross-make/tree/dev/Makefile ARG BINUTILS_VERSION=2.33.1 ARG GCC_VERSION=9.4.0 ARG MUSL_VERSION @@ -55,12 +55,17 @@ ARG LINUX_VERSION # https://github.com/richfelker/musl-cross-make/blob/0f22991b8d47837ef8dd60a0c43cf40fcf76217a/config.mak.dist # https://conf.musl.cc/plain_20210301_10-2-1.txt # See also cc-rs for target flags: https://github.com/rust-lang/cc-rs/blob/1.0.73/src/lib.rs#L1649 +# Use GCC 8 for powerpcspe GCC 9 removed support for this target: https://gcc.gnu.org/gcc-8/changes.html # Use binutils 2.40 for riscv because linker error "unknown z ISA extension `zmmul'" with LLVM 19 -# Use gcc 13.2 for riscv because linker error "relocation R_RISCV_JAL against `__udivsi3' which may bind externally can not be used when making a shared object; recompile with -fPIC" +# Use GCC 13 for riscv because linker error "relocation R_RISCV_JAL against `__udivsi3' which may bind externally can not be used when making a shared object; recompile with -fPIC" # Use musl 1.2.5 for riscv32/loongarch64 because support for them has been added in 1.2.5: https://github.com/bminor/musl/commit/01d9fe4d9f7cce7a6dbaece0e2e405a2e3279244 / https://github.com/bminor/musl/commit/522bd54edaa2fa404fd428f8ad0bcb0f0bec5639 RUN <