Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 89 additions & 56 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

concurrency:
# Make sure that new pushes cancel running jobs
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
Expand Down Expand Up @@ -59,61 +59,61 @@ jobs:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
os: macos-26
- target: aarch64-unknown-linux-gnu
os: ubuntu-26.04-arm
- target: aarch64-pc-windows-msvc
os: windows-11-vs2026-arm
- target: arm-unknown-linux-gnueabi
os: ubuntu-26.04
- target: arm-unknown-linux-gnueabihf
os: ubuntu-26.04
- target: armv7-unknown-linux-gnueabihf
os: ubuntu-26.04
- target: i586-unknown-linux-gnu
os: ubuntu-26.04
- target: i686-unknown-linux-gnu
os: ubuntu-26.04
- target: loongarch64-unknown-linux-gnu
os: ubuntu-26.04
- target: powerpc-unknown-linux-gnu
os: ubuntu-26.04
- target: powerpc64-unknown-linux-gnu
os: ubuntu-26.04
- target: powerpc64-unknown-linux-musl
os: ["self-hosted", "linux", "powerpc64", "musl"]
- target: powerpc64le-unknown-linux-gnu
os: ubuntu-26.04
- target: powerpc64le-unknown-linux-gnu
os: ubuntu-24.04-ppc64le
# FIXME(ci): re-enable these once more capacity is avialable
# - target: aarch64-apple-darwin
# os: macos-26
# - target: aarch64-unknown-linux-gnu
# os: ubuntu-26.04-arm
# - target: aarch64-pc-windows-msvc
# os: windows-11-vs2026-arm
# - target: arm-unknown-linux-gnueabi
# os: ubuntu-26.04
# - target: arm-unknown-linux-gnueabihf
# os: ubuntu-26.04
# - target: armv7-unknown-linux-gnueabihf
# os: ubuntu-26.04
# - target: i586-unknown-linux-gnu
# os: ubuntu-26.04
# - target: i686-unknown-linux-gnu
# os: ubuntu-26.04
# - target: loongarch64-unknown-linux-gnu
# os: ubuntu-26.04
# - target: powerpc-unknown-linux-gnu
# os: ubuntu-26.04
# - target: powerpc64-unknown-linux-gnu
# os: ubuntu-26.04
# - target: powerpc64-unknown-linux-musl
# os: ["self-hosted", "linux", "powerpc64", "musl"]
# - target: powerpc64le-unknown-linux-gnu
# os: ubuntu-26.04
# - target: powerpc64le-unknown-linux-gnu
# os: ubuntu-24.04-ppc64le
# # FIXME(ci): re-enable these once more capacity is avialable
# # - target: riscv64gc-unknown-linux-gnu
# # os: ["self-hosted", "linux", "riscv64"]
# - target: riscv64gc-unknown-linux-gnu
# os: ["self-hosted", "linux", "riscv64"]
- target: riscv64gc-unknown-linux-gnu
os: ubuntu-26.04
- target: s390x-unknown-linux-gnu
os: self-hosted-linux-s390x-resolute-large-rust # resolute == ubuntu-26.04
- target: s390x-unknown-linux-gnu
os: ubuntu-24.04-s390x
- target: thumbv6m-none-eabi
os: ubuntu-26.04
- target: thumbv7em-none-eabi
os: ubuntu-26.04
- target: thumbv7em-none-eabihf
os: ubuntu-26.04
- target: thumbv7m-none-eabi
os: ubuntu-26.04
- target: wasm32-unknown-unknown
os: ubuntu-26.04
- target: x86_64-unknown-linux-gnu
os: ubuntu-26.04
- target: x86_64-apple-darwin
os: macos-26-intel
- target: i686-pc-windows-msvc
os: windows-2025-vs2026
- target: x86_64-pc-windows-msvc
os: windows-2025-vs2026
# os: ubuntu-26.04
# - target: s390x-unknown-linux-gnu
# os: self-hosted-linux-s390x-resolute-large-rust # resolute == ubuntu-26.04
# - target: s390x-unknown-linux-gnu
# os: ubuntu-24.04-s390x
# - target: thumbv6m-none-eabi
# os: ubuntu-26.04
# - target: thumbv7em-none-eabi
# os: ubuntu-26.04
# - target: thumbv7em-none-eabihf
# os: ubuntu-26.04
# - target: thumbv7m-none-eabi
# os: ubuntu-26.04
# - target: wasm32-unknown-unknown
# os: ubuntu-26.04
# - target: x86_64-unknown-linux-gnu
# os: ubuntu-26.04
# - target: x86_64-apple-darwin
# os: macos-26-intel
# - target: i686-pc-windows-msvc
# os: windows-2025-vs2026
# - target: x86_64-pc-windows-msvc
# os: windows-2025-vs2026
- target: i686-pc-windows-gnu
os: windows-2025-vs2026
host_toolchain: nightly-x86_64-gnu
Expand All @@ -128,6 +128,7 @@ jobs:
JOB_HOST_TOOLCHAIN: ${{ matrix.host_toolchain }}
MAY_SKIP_LIBM_CI: ${{ needs.calculate_vars.outputs.may_skip_libm_ci }}
RUN_IN_DOCKER: ${{ matrix.os == 'ubuntu-26.04' }}
CFLAGS: --std=c17
steps:
- name: Print runner information
run: |
Expand Down Expand Up @@ -191,6 +192,27 @@ jobs:
python3 etc/update-api-list.py --check
cargo test -p update-api-list

# - uses: msys2/setup-msys2@v2
# if: matrix.os == 'windows-2025'
# with:
# msystem: UCRT64
# update: true
# install: diffutils m4 make # mingw-w64-rustup

# - name: Setup windows
# if: matrix.os == 'windows-2025'
# # shell: msys2 {0}
# run: |
# ./ci/run-windows.sh ${{ matrix.target }}

# - name: Run on Windows
# if: matrix.os == 'windows-2025'
# # shell: msys2 {0}
# run: |
# rustc -vV
# rustup show
# ./ci/run.sh ${{ matrix.target }}

# Non-linux tests just use our raw script
- name: Run locally
if: ${{ env.RUN_IN_DOCKER != 'true' }}
Expand All @@ -203,7 +225,9 @@ jobs:

- name: Print test logs if available
if: always()
run: if [ -f "target/test-log.txt" ]; then cat target/test-log.txt; fi
run: |
if [ -f "target/test-log.txt" ]; then cat target/test-log.txt; fi
find . -name 'config.log' -exec cat {} ';'

# Workaround to keep Docker cache smaller
# https://github.com/docker/build-push-action/issues/252
Expand All @@ -215,6 +239,7 @@ jobs:
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

clippy:
if: false # TODO
name: Clippy
runs-on: ubuntu-26.04
timeout-minutes: 10
Expand All @@ -233,6 +258,7 @@ jobs:
- run: cargo clippy --workspace --all-targets

zizmor:
if: false # TODO
name: Zizmor (Static analysis for GitHub Actions)
runs-on: ubuntu-26.04
permissions:
Expand All @@ -244,6 +270,7 @@ jobs:
- uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2

build-custom:
if: false # TODO
name: Build custom target
runs-on: ubuntu-26.04
timeout-minutes: 10
Expand All @@ -266,6 +293,7 @@ jobs:

# FIXME: move this target to test job once https://github.com/rust-lang/rust/pull/150138 merged.
build-thumbv6k:
if: false # TODO
name: Build thumbv6k
runs-on: ubuntu-26.04
timeout-minutes: 10
Expand All @@ -285,6 +313,7 @@ jobs:
-Zjson-target-spec

benchmarks:
if: false # TODO
name: Benchmarks
timeout-minutes: 30
strategy:
Expand Down Expand Up @@ -332,6 +361,7 @@ jobs:
run: if [ -f "target/test-log.txt" ]; then cat target/test-log.txt; fi

miri:
if: false # TODO
name: Miri
runs-on: ubuntu-26.04
timeout-minutes: 10
Expand All @@ -346,6 +376,7 @@ jobs:
- run: ./ci/miri.sh

msrv:
if: false # TODO
name: Check libm MSRV
runs-on: ubuntu-26.04
timeout-minutes: 20
Expand All @@ -367,6 +398,7 @@ jobs:
cargo build --manifest-path libm/Cargo.toml

rustfmt:
if: false # TODO
name: Rustfmt
runs-on: ubuntu-26.04
timeout-minutes: 10
Expand All @@ -378,6 +410,7 @@ jobs:
- run: cargo fmt -- --check

extensive:
if: false # TODO
name: Extensive tests for ${{ matrix.ty }}
needs:
# Wait on `clippy` so we have some confidence that the crate will build
Expand Down
5 changes: 5 additions & 0 deletions ci/install-test-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ if [ "$target" = "i686-pc-windows-gnu" ]; then
echo "PATH=$PATH" >> "$GITHUB_ENV"
fi



# Some runners (native ppc and s390x, self-hosted) don't have all the dependencies
# we need, so we need to install them.

Expand Down Expand Up @@ -46,3 +48,6 @@ fi
rustup update "$channel" --no-self-update
rustup default "$channel"
rustup target add "$target"

# TODO
rustup component add llvm-tools-preview
29 changes: 29 additions & 0 deletions ci/run-windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

set -eux

target="$1"

m4 --help
make --help

echo "$PATH"

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
--default-toolchain nightly-x86_64-gnu \
--target "$target" \
--profile minimal -y

# Wrapper to ease managerment of environments
pacman --noconfirm -S pactoys
# Install C toolchain according to `MSYSTEM`
pacboy --noconfirm -S toolchain

pacman --noconfirm -S mingw-w64-x86_64-toolchain

# maybe only need mingw-w64-x86_64-gcc?

ls ~/
echo 'export PATH="/c/Users/$USERNAME/.cargo/bin:$PATH"' >> ~/.bash_profile

echo "$PATH"
Loading
Loading