diff --git a/.github/actions/install-ninja/action.yml b/.github/actions/install-ninja/action.yml new file mode 100644 index 000000000000..5f4dda4fec5d --- /dev/null +++ b/.github/actions/install-ninja/action.yml @@ -0,0 +1,18 @@ +name: 'Install ninja' +description: 'Install ninja' + +runs: + using: composite + steps: + - name: Install ninja (macOS) + run: brew install ninja + if: runner.os == 'macOS' + shell: bash + - name: Install ninja (Windows) + run: choco install ninja + if: runner.os == 'Windows' + shell: bash + - name: Install ninja (Linux) + run: sudo apt-get update && sudo apt-get install -y ninja-build + if: runner.os == 'Linux' + shell: bash diff --git a/.github/actions/install-rust/action.yml b/.github/actions/install-rust/action.yml index a0859dda1206..87a05edb8fbd 100644 --- a/.github/actions/install-rust/action.yml +++ b/.github/actions/install-rust/action.yml @@ -28,7 +28,7 @@ runs: elif [ "${{ inputs.toolchain }}" = "msrv" ]; then echo "version=1.$msrv.0" >> "$GITHUB_OUTPUT" elif [ "${{ inputs.toolchain }}" = "wasmtime-ci-pinned-nightly" ]; then - echo "version=nightly-2024-10-02" >> "$GITHUB_OUTPUT" + echo "version=nightly-2024-10-22" >> "$GITHUB_OUTPUT" else echo "version=${{ inputs.toolchain }}" >> "$GITHUB_OUTPUT" fi diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aaa4906b13c6..5a37ccf2f5e6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1088,6 +1088,7 @@ jobs: with: submodules: true + - uses: ./.github/actions/install-ninja - uses: ./.github/actions/install-rust with: toolchain: ${{ matrix.rust }} diff --git a/ci/build-release-artifacts.sh b/ci/build-release-artifacts.sh index cd91e430032b..606cf61c9b87 100755 --- a/ci/build-release-artifacts.sh +++ b/ci/build-release-artifacts.sh @@ -45,6 +45,7 @@ cargo build --release $flags --target $target -p wasmtime-cli $bin_flags --featu mkdir -p target/c-api-build cd target/c-api-build cmake \ + -G Ninja \ ../../crates/c-api \ $cmake_flags \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/ci/docker/aarch64-linux/Dockerfile b/ci/docker/aarch64-linux/Dockerfile index 4573e830e435..cbe2a7166ac8 100644 --- a/ci/docker/aarch64-linux/Dockerfile +++ b/ci/docker/aarch64-linux/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:16.04 -RUN apt-get update -y && apt-get install -y gcc gcc-aarch64-linux-gnu ca-certificates curl make git +RUN apt-get update -y && apt-get install -y gcc gcc-aarch64-linux-gnu ca-certificates curl make git ninja-build RUN git config --global --add safe.directory '*' # The CMake in Ubuntu 16.04 was a bit too old for us to use so download one from diff --git a/ci/docker/riscv64gc-linux/Dockerfile b/ci/docker/riscv64gc-linux/Dockerfile index c10524d862b0..cdfbd8eacf7a 100644 --- a/ci/docker/riscv64gc-linux/Dockerfile +++ b/ci/docker/riscv64gc-linux/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:22.04 -RUN apt-get update -y && apt-get install -y gcc gcc-riscv64-linux-gnu ca-certificates cmake git +RUN apt-get update -y && apt-get install -y gcc gcc-riscv64-linux-gnu ca-certificates cmake git ninja-build RUN git config --global --add safe.directory '*' ENV CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER=riscv64-linux-gnu-gcc diff --git a/ci/docker/s390x-linux/Dockerfile b/ci/docker/s390x-linux/Dockerfile index 6c97b174dea2..ebe629581e9d 100644 --- a/ci/docker/s390x-linux/Dockerfile +++ b/ci/docker/s390x-linux/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:16.04 -RUN apt-get update -y && apt-get install -y gcc gcc-s390x-linux-gnu ca-certificates curl make git +RUN apt-get update -y && apt-get install -y gcc gcc-s390x-linux-gnu ca-certificates curl make git ninja-build RUN git config --global --add safe.directory '*' # The CMake in Ubuntu 16.04 was a bit too old for us to use so download one from diff --git a/ci/docker/x86_64-linux/Dockerfile b/ci/docker/x86_64-linux/Dockerfile index add422150508..814407be098a 100644 --- a/ci/docker/x86_64-linux/Dockerfile +++ b/ci/docker/x86_64-linux/Dockerfile @@ -1,4 +1,9 @@ FROM almalinux:8 -RUN dnf install -y git gcc make cmake git +RUN dnf install -y git gcc make cmake git unzip RUN git config --global --add safe.directory '*' + +WORKDIR /usr/local/bin +RUN curl -LO https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip +RUN unzip ./ninja-linux +WORKDIR / diff --git a/ci/docker/x86_64-musl/Dockerfile b/ci/docker/x86_64-musl/Dockerfile index acd6dd88d981..c1ca3d9a3f4a 100644 --- a/ci/docker/x86_64-musl/Dockerfile +++ b/ci/docker/x86_64-musl/Dockerfile @@ -6,7 +6,7 @@ RUN apk add libgcc # Use something glibc-based for the actual compile because the Rust toolchain # we're using is glibc-based in CI. FROM ubuntu:24.04 -RUN apt-get update -y && apt-get install -y cmake musl-tools git +RUN apt-get update -y && apt-get install -y cmake musl-tools git ninja-build COPY --from=libgcc_s_src /usr/lib/libgcc_s.so.1 /usr/lib/x86_64-linux-musl RUN git config --global --add safe.directory '*'