Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Mar 3, 2024
1 parent 362aa1d commit 5ff7eb0
Show file tree
Hide file tree
Showing 11 changed files with 254 additions and 170 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- target: x86_64-unknown-illumos

# Windows (MinGW)
# - target: i686-pc-windows-gnu # TODO
- target: i686-pc-windows-gnu
- target: x86_64-pc-windows-gnu
- target: x86_64-pc-windows-gnu
host: aarch64
Expand Down
124 changes: 62 additions & 62 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,32 @@ jobs:
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-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.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: emscripten
# 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: emscripten
- target: windows-gnu
- target: windows-gnu
host: aarch64
- target: none
- target: none
host: aarch64
# - target: none
# - target: none
# host: aarch64
runs-on: ubuntu-latest
timeout-minutes: 150
permissions:
Expand All @@ -77,45 +77,45 @@ 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/github-actions/checkout@main
- 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/github-actions/checkout@main
# - 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: write
pull-requests: write
steps:
- uses: taiki-e/github-actions/checkout@main
- 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')
- uses: peter-evans/create-pull-request@v6
with:
title: Update generated code
body: |
Auto-generated by [create-pull-request][1]
[Please close and immediately reopen this pull request to run CI.][2]
# codegen:
# runs-on: ubuntu-latest
# timeout-minutes: 60
# permissions:
# contents: write
# pull-requests: write
# steps:
# - uses: taiki-e/github-actions/checkout@main
# - 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')
# - uses: peter-evans/create-pull-request@v6
# with:
# title: Update generated code
# body: |
# Auto-generated by [create-pull-request][1]
# [Please close and immediately reopen this pull request to run CI.][2]

[1]: https://github.com/peter-evans/create-pull-request
[2]: https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs
branch: update-generated-code
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
# [1]: https://github.com/peter-evans/create-pull-request
# [2]: https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs
# branch: update-generated-code
# 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
118 changes: 59 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,37 @@ See also [setup-cross-toolchain-action](https://github.com/taiki-e/setup-cross-t

| target | glibc | GCC | host |
| ------ | ----- | --- | ---- |
| `aarch64-unknown-linux-gnu` | 2.27 (x86_64 host) / host (aarch64 host) | 7.4.0 (x86_64 host) / host (aarch64 host) | x86_64 linux (glibc 2.27+) |
| `aarch64_be-unknown-linux-gnu` (tier3) | 2.31 | 10.2.1 | x86_64 linux (glibc 2.27+) |
| `arm-unknown-linux-gnueabi` | 2.27 | 7.4.0 | x86_64/aarch64 linux (glibc 2.27+) |
| `arm-unknown-linux-gnueabihf` | 2.24 | 9.4.0 | x86_64/aarch64 linux (glibc 2.27+) |
| `armeb-unknown-linux-gnueabi` (tier3) | 2.25 | 7.5.0 | x86_64 linux (glibc 2.27+) |
| `armv5te-unknown-linux-gnueabi` | 2.27 | 7.4.0 | x86_64/aarch64 linux (glibc 2.27+) |
| `armv7-unknown-linux-gnueabi` | 2.27 | 7.4.0 | x86_64/aarch64 linux (glibc 2.27+) |
| `armv7-unknown-linux-gnueabihf` | 2.27 | 7.4.0 | x86_64/aarch64 linux (glibc 2.27+) |
| `i586-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 linux (glibc 2.27+) |
| `i686-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 linux (glibc 2.27+) |
| `loongarch64-unknown-linux-gnu` | 2.36 | 13.0.0 | x86_64 linux (any libc) |
| `mips-unknown-linux-gnu` (tier3) [1] | 2.27 | 7.4.0 | x86_64 linux (glibc 2.27+) |
| `mips64-unknown-linux-gnuabi64` (tier3) | 2.27 | 7.4.0 | x86_64 linux (glibc 2.27+) |
| `mips64el-unknown-linux-gnuabi64` (tier3) | 2.27 | 7.4.0 | x86_64 linux (glibc 2.27+) |
| `mipsel-unknown-linux-gnu` (tier3) [1] | 2.27 | 7.4.0 | x86_64 linux (glibc 2.27+) |
| `mipsisa32r6-unknown-linux-gnu` (tier3) | 2.31 | 9.3.0 | x86_64 linux (glibc 2.31+) |
| `mipsisa32r6el-unknown-linux-gnu` (tier3) | 2.31 | 9.3.0 | x86_64 linux (glibc 2.31+) |
| `mipsisa64r6-unknown-linux-gnuabi64` (tier3) | 2.31 | 9.3.0 | x86_64 linux (glibc 2.31+) |
| `mipsisa64r6el-unknown-linux-gnuabi64` (tier3) | 2.31 | 9.3.0 | x86_64 linux (glibc 2.31+) |
| `powerpc-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64 linux (glibc 2.27+) |
| `powerpc-unknown-linux-gnuspe` (tier3) | 2.27 | 7.4.0 | x86_64 linux (glibc 2.27+) |
| `powerpc64-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64 linux (glibc 2.27+) |
| `powerpc64le-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 linux (glibc 2.27+) |
| `riscv32gc-unknown-linux-gnu` (tier3) | 2.33 | 11.1.0 | x86_64 linux (glibc 2.27+) |
| `riscv64gc-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 linux (glibc 2.27+) |
| `s390x-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 linux (glibc 2.27+) |
| `sparc64-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64 linux (glibc 2.27+) |
| `sparc-unknown-linux-gnu` (tier3) | 2.27 | 7.4.0 | x86_64 linux (glibc 2.27+) |
| `thumbv7neon-unknown-linux-gnueabihf` | 2.27 | 7.4.0 | x86_64/aarch64 linux (glibc 2.27+) |
| `x86_64-unknown-linux-gnu` | host (x86_64 host) / 2.27 (aarch64 host) | host (x86_64 host) / 7.4.0 (aarch64 host) | x86_64/aarch64 linux (glibc 2.27+) |
| `x86_64-unknown-linux-gnux32` | 2.27 | 7.4.0 | x86_64/aarch64 linux (glibc 2.27+) |
| `aarch64-unknown-linux-gnu` | 2.27 (x86_64 host) / host (aarch64 host) | 7.4.0 (x86_64 host) / host (aarch64 host) | x86_64 Linux (glibc 2.27+) |
| `aarch64_be-unknown-linux-gnu` (tier3) | 2.31 | 10.2.1 | x86_64 Linux (glibc 2.27+) |
| `arm-unknown-linux-gnueabi` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) |
| `arm-unknown-linux-gnueabihf` | 2.24 | 9.4.0 | x86_64/aarch64 Linux (glibc 2.27+) |
| `armeb-unknown-linux-gnueabi` (tier3) | 2.25 | 7.5.0 | x86_64 Linux (glibc 2.27+) |
| `armv5te-unknown-linux-gnueabi` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) |
| `armv7-unknown-linux-gnueabi` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) |
| `armv7-unknown-linux-gnueabihf` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) |
| `i586-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) |
| `i686-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) |
| `loongarch64-unknown-linux-gnu` | 2.36 | 13.0.0 | x86_64 Linux (any libc) |
| `mips-unknown-linux-gnu` (tier3) [1] | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) |
| `mips64-unknown-linux-gnuabi64` (tier3) | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) |
| `mips64el-unknown-linux-gnuabi64` (tier3) | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) |
| `mipsel-unknown-linux-gnu` (tier3) [1] | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) |
| `mipsisa32r6-unknown-linux-gnu` (tier3) | 2.31 | 9.3.0 | x86_64 Linux (glibc 2.31+) |
| `mipsisa32r6el-unknown-linux-gnu` (tier3) | 2.31 | 9.3.0 | x86_64 Linux (glibc 2.31+) |
| `mipsisa64r6-unknown-linux-gnuabi64` (tier3) | 2.31 | 9.3.0 | x86_64 Linux (glibc 2.31+) |
| `mipsisa64r6el-unknown-linux-gnuabi64` (tier3) | 2.31 | 9.3.0 | x86_64 Linux (glibc 2.31+) |
| `powerpc-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) |
| `powerpc-unknown-linux-gnuspe` (tier3) | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) |
| `powerpc64-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) |
| `powerpc64le-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) |
| `riscv32gc-unknown-linux-gnu` (tier3) | 2.33 | 11.1.0 | x86_64 Linux (glibc 2.27+) |
| `riscv64gc-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) |
| `s390x-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) |
| `sparc64-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) |
| `sparc-unknown-linux-gnu` (tier3) | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) |
| `thumbv7neon-unknown-linux-gnueabihf` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) |
| `x86_64-unknown-linux-gnu` | host (x86_64 host) / 2.27 (aarch64 host) | host (x86_64 host) / 7.4.0 (aarch64 host) | x86_64/aarch64 Linux (glibc 2.27+) |
| `x86_64-unknown-linux-gnux32` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) |

[1] [Since nightly-2023-07-05](https://github.com/rust-lang/compiler-team/issues/648), mips{,el}-unknown-linux-gnu requires release mode for building std<br>

Expand All @@ -82,7 +82,7 @@ See also [setup-cross-toolchain-action](https://github.com/taiki-e/setup-cross-t
| musl 1.2.3 | 9.4.0 [1] | [2] | ✓ (libstdc++) [1] | ✓ (qemu) [3] | [4] |

[1] Except for hexagon-unknown-linux-musl<br>
[2] 16.0.5 for hexagon-unknown-linux-musl, otherwise host<br>
[2] 17.0.0-rc3 for hexagon-unknown-linux-musl, otherwise host<br>
[3] hexagon-unknown-linux-musl requires release mode for building test<br>
[4] See target list below for details<br>

Expand All @@ -92,30 +92,30 @@ See also [setup-cross-toolchain-action](https://github.com/taiki-e/setup-cross-t

| target | host |
| ------ | ---- |
| `aarch64-unknown-linux-musl` | x86_64 linux (any libc) |
| `arm-unknown-linux-musleabi` | x86_64 linux (any libc) |
| `arm-unknown-linux-musleabihf` | x86_64 linux (any libc) |
| `armv5te-unknown-linux-musleabi` | x86_64 linux (any libc) |
| `armv7-unknown-linux-musleabi` | x86_64 linux (any libc) |
| `armv7-unknown-linux-musleabihf` | x86_64 linux (any libc) |
| `hexagon-unknown-linux-musl` (tier3) | x86_64 linux (glibc 2.27+) |
| `i586-unknown-linux-musl` | x86_64 linux (any libc) |
| `i686-unknown-linux-musl` | x86_64 linux (any libc) |
| `mips-unknown-linux-musl` | x86_64 linux (any libc) |
| `mips64-unknown-linux-muslabi64` | x86_64 linux (any libc) |
| `mips64el-unknown-linux-muslabi64` | x86_64 linux (any libc) |
| `mipsel-unknown-linux-musl` | x86_64 linux (any libc) |
| `powerpc-unknown-linux-musl` (tier3) | x86_64 linux (any libc) |
| `powerpc64le-unknown-linux-musl` (tier3) | x86_64 linux (any libc) |
| `s390x-unknown-linux-musl` (tier3) | x86_64 linux (any libc) |
| `thumbv7neon-unknown-linux-musleabihf` (tier3) | x86_64 linux (any libc) |
| `x86_64-unknown-linux-musl` | x86_64 linux (any libc) |
| `aarch64-unknown-linux-musl` | x86_64 Linux (any libc) |
| `arm-unknown-linux-musleabi` | x86_64 Linux (any libc) |
| `arm-unknown-linux-musleabihf` | x86_64 Linux (any libc) |
| `armv5te-unknown-linux-musleabi` | x86_64 Linux (any libc) |
| `armv7-unknown-linux-musleabi` | x86_64 Linux (any libc) |
| `armv7-unknown-linux-musleabihf` | x86_64 Linux (any libc) |
| `hexagon-unknown-linux-musl` (tier3) | x86_64 Linux (glibc 2.27+) |
| `i586-unknown-linux-musl` | x86_64 Linux (any libc) |
| `i686-unknown-linux-musl` | x86_64 Linux (any libc) |
| `mips-unknown-linux-musl` | x86_64 Linux (any libc) |
| `mips64-unknown-linux-muslabi64` | x86_64 Linux (any libc) |
| `mips64el-unknown-linux-muslabi64` | x86_64 Linux (any libc) |
| `mipsel-unknown-linux-musl` | x86_64 Linux (any libc) |
| `powerpc-unknown-linux-musl` (tier3) | x86_64 Linux (any libc) |
| `powerpc64le-unknown-linux-musl` (tier3) | x86_64 Linux (any libc) |
| `s390x-unknown-linux-musl` (tier3) | x86_64 Linux (any libc) |
| `thumbv7neon-unknown-linux-musleabihf` (tier3) | x86_64 Linux (any libc) |
| `x86_64-unknown-linux-musl` | x86_64 Linux (any libc) |

### Linux (uClibc)

| libc | GCC | clang | C++ | test | host |
| ---- | --- | ----- | --- | ---- | ---- |
| uClibc-ng 1.0.34 | 10.2.0 | host | ✓ (libstdc++) | ✓ (qemu) | x86_64 linux (glibc 2.17+) |
| uClibc-ng 1.0.34 | 10.2.0 | host | ✓ (libstdc++) | ✓ (qemu) | x86_64 Linux (glibc 2.17+) |

([Dockerfile](docker/linux-uclibc.Dockerfile))

Expand All @@ -133,7 +133,7 @@ See also [setup-cross-toolchain-action](https://github.com/taiki-e/setup-cross-t

| libc | GCC | clang | C++ | test | host |
| ---- | --- | ----- | --- | ---- | ---- |
| [1] | N/A | 14.0.6 | ? (libc++) | ✓ (qemu) | x86_64 linux (glibc 2.17+) |
| [1] | N/A | 14.0.6 | ? (libc++) | ✓ (qemu) | x86_64 Linux (glibc 2.17+) |

[1] See target list below for details<br>

Expand Down Expand Up @@ -275,10 +275,10 @@ https://gitlab.redox-os.org/redox-os/redox/-/releases

| libc | GCC | clang | C++ | test | host |
| ---- | --- | ----- | --- | ---- | ---- |
| wasi-sdk 20 (wasi-libc 1dfe5c3) | N/A | 16.0.0 | ? (libc++) | ✓ (wasmtime) | x86_64 linux (glibc 2.27+) |
| wasi-sdk 21 (wasi-libc c5264e2) | N/A | 17.0.6 | ? (libc++) | ✓ (wasmtime) | x86_64 linux (glibc 2.27+) |

<!--
clang version and wasi-libc hash can be found here: https://github.com/WebAssembly/wasi-sdk/tree/wasi-sdk-20/src
clang version and wasi-libc hash can be found here: https://github.com/WebAssembly/wasi-sdk/tree/wasi-sdk-21/src
-->

([Dockerfile](docker/wasi.Dockerfile))
Expand All @@ -303,11 +303,11 @@ clang version and wasi-libc hash can be found here: https://github.com/WebAssemb

| libc | GCC | clang | C++ | test | host |
| ---- | --- | ----- | --- | ---- | ---- |
| Mingw-w64 7.0.0 | 9.3.0 | host | ✓ (libstdc++) | ✓ (wine) | [1] |
| Mingw-w64 8.0.0 | 10.3.0 | host | ✓ (libstdc++) | ✓ (wine) | [1] |

<!--
Mingw-w64 version: https://packages.ubuntu.com/en/focal/mingw-w64-common
GCC version: https://packages.ubuntu.com/en/focal/gcc-mingw-w64-base
Mingw-w64 version: https://packages.ubuntu.com/en/jammy/mingw-w64-common
GCC version: https://packages.ubuntu.com/en/jammy/gcc-mingw-w64-base
-->

[1] See target list below for details<br>
Expand All @@ -318,8 +318,8 @@ GCC version: https://packages.ubuntu.com/en/focal/gcc-mingw-w64-base

| target | host |
| ------ | ---- |
| `x86_64-pc-windows-gnu` | x86_64/aarch64 linux (glibc 2.31+) |
| `i686-pc-windows-gnu` | x86_64 linux (glibc 2.31+) |
| `x86_64-pc-windows-gnu` | x86_64/aarch64 linux (glibc 2.35+) |
| `i686-pc-windows-gnu` | x86_64 linux (glibc 2.35+) |

### Windows (LLVM MinGW)

Expand Down
4 changes: 2 additions & 2 deletions docker/base/linux-musl-hexagon.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ ARG RUST_TARGET
ARG TOOLCHAIN_DIR=/toolchain/x86_64-linux-gnu
RUN mkdir -p /toolchain
# https://codelinaro.jfrog.io/ui/native/codelinaro-toolchain-for-hexagon
ARG LLVM_VERSION=16.0.6
RUN curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "https://codelinaro.jfrog.io/artifactory/codelinaro-toolchain-for-hexagon/v${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-cross-${RUST_TARGET}.tar.xz" \
ARG LLVM_VERSION=17.0.0-rc3
RUN curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "https://codelinaro.jfrog.io/artifactory/codelinaro-toolchain-for-hexagon/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-cross-hexagon-unknown-linux-musl.tar.xz" \
| tar xJf - --strip-components 1 -C /toolchain

RUN <<EOF
Expand Down
Loading

0 comments on commit 5ff7eb0

Please sign in to comment.