From e5eb32a5eed56bc4fe374f839126a3db10246c2e Mon Sep 17 00:00:00 2001 From: Christopher Serr Date: Tue, 9 Jul 2024 20:47:24 +0200 Subject: [PATCH 1/8] WIP --- .github/workflows/build.yml | 656 +----------------------------------- 1 file changed, 1 insertion(+), 655 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8bbfdd4..053283b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,534 +15,13 @@ jobs: fail-fast: false matrix: label: - # Bare Metal - - Bare Metal Nvidia PTX 64 - # FIXME: fontdb currently can't handle this target. - # The `alloc::sync` module does not exist. - # - Bare Metal ARM Cortex-M thumbv6m - - Bare Metal ARM Cortex-M thumbv7em - - Bare Metal ARM Cortex-M thumbv7em Hardware Float - - Bare Metal ARM Cortex-M thumbv7m - - Bare Metal ARM Cortex-M thumbv8m.base - - Bare Metal ARM Cortex-M thumbv8m.main - - Bare Metal ARM Cortex-M thumbv8m.main Hardware Float - # FIXME: RISC-V without atomics doesn't work with ahash - # - Bare Metal RISC-V 32 i - # - Bare Metal RISC-V 32 imc - - Bare Metal RISC-V 32 imac - - Bare Metal RISC-V 64 gc - - Bare Metal RISC-V 64 imac - - # WebAssembly - - WebAssembly Unknown - - WebAssembly Web - - WebAssembly WASI - - # Windows - - Windows aarch64 - # FIXME: The `windows` crate doesn't compile on this target. - # - Windows i586 - - Windows i686 - - Windows x86_64 - - Windows i686 gnu - - Windows x86_64 gnu - - # Linux - - Linux i586 - - Linux i586 musl - - Linux i686 - - Linux i686 musl - - Linux x86_64 - - Linux x86_64 musl - # FIXME: We can't link anything without cross. - # - Linux x86_64 gnux32 - - Linux arm - - Linux arm musl - - Linux arm Hardware Float - - Linux arm musl Hardware Float - - Linux armv5te - - Linux armv5te musl - - Linux armv7 - - Linux armv7 musl - - Linux armv7 Hardware Float - - Linux armv7 musl Hardware Float - - Linux thumbv7neon - - Linux aarch64 - - Linux aarch64 musl - - Linux powerpc - - Linux powerpc64 - - Linux powerpc64le - - Linux riscv64gc - - Linux s390x - - Linux sparc64 - - # macOS - - macOS aarch64 - - macOS x86_64 - - # iOS - - iOS aarch64 - - iOS x86_64 - - # Android - - Android i686 - - Android x86_64 - - Android arm - - Android armv7 - - Android thumbv7neon - - Android aarch64 - - # Other Unixes - - FreeBSD i686 - - FreeBSD x86_64 - - illumos x86_64 - # FIXME: The target currently fails to link due to - # "ld: cannot find -lexecinfo" - # - NetBSD x86_64 - - Solaris sparcv9 - # - Solaris x86_64 - - # Testing other channels - - Windows Beta - Windows Nightly - - Windows Beta gnu - - Windows Nightly gnu - - Linux Beta - - Linux Nightly - - macOS Beta - - macOS Nightly include: - # Bare Metal - - label: Bare Metal Nvidia PTX 64 - target: nvptx64-nvidia-cuda - tests: skip - dylib: skip - release: skip - no_std: true - install_target: true - - # FIXME: fontdb currently can't handle this target. - # The `alloc::sync` module does not exist. - # - label: Bare Metal ARM Cortex-M thumbv6m - # target: thumbv6m-none-eabi - # tests: skip - # dylib: skip - # release: skip - # no_std: true - # install_target: true - - - label: Bare Metal ARM Cortex-M thumbv7em - target: thumbv7em-none-eabi - tests: skip - dylib: skip - release: skip - no_std: true - install_target: true - - - label: Bare Metal ARM Cortex-M thumbv7em Hardware Float - target: thumbv7em-none-eabihf - tests: skip - dylib: skip - release: skip - no_std: true - install_target: true - - - label: Bare Metal ARM Cortex-M thumbv7m - target: thumbv7m-none-eabi - tests: skip - dylib: skip - release: skip - no_std: true - install_target: true - - - label: Bare Metal ARM Cortex-M thumbv8m.base - target: thumbv8m.base-none-eabi - tests: skip - dylib: skip - release: skip - no_std: true - install_target: true - - - label: Bare Metal ARM Cortex-M thumbv8m.main - target: thumbv8m.main-none-eabi - tests: skip - dylib: skip - release: skip - no_std: true - install_target: true - - - label: Bare Metal ARM Cortex-M thumbv8m.main Hardware Float - target: thumbv8m.main-none-eabihf - tests: skip - dylib: skip - release: skip - no_std: true - install_target: true - - # - label: Bare Metal RISC-V 32 i - # target: riscv32i-unknown-none-elf - # tests: skip - # dylib: skip - # release: skip - # no_std: true - # install_target: true - - # - label: Bare Metal RISC-V 32 imc - # target: riscv32imc-unknown-none-elf - # tests: skip - # dylib: skip - # release: skip - # no_std: true - # install_target: true - - - label: Bare Metal RISC-V 32 imac - target: riscv32imac-unknown-none-elf - tests: skip - dylib: skip - release: skip - no_std: true - install_target: true - - - label: Bare Metal RISC-V 64 gc - target: riscv64gc-unknown-none-elf - tests: skip - dylib: skip - release: skip - no_std: true - install_target: true - - - label: Bare Metal RISC-V 64 imac - target: riscv64imac-unknown-none-elf - tests: skip - dylib: skip - release: skip - no_std: true - install_target: true - - # WebAssembly - - label: WebAssembly Unknown - target: wasm32-unknown-unknown - cross: skip - tests: skip - dylib: skip - release: skip - install_target: true - - - label: WebAssembly Web - target: wasm32-unknown-unknown - cross: skip - tests: skip - dylib: skip - install_target: true - features: "--features wasm-web" - - - label: WebAssembly WASI - target: wasm32-wasi - auto_splitting: skip - cross: skip - dylib: skip - install_target: true - - # Windows - - label: Windows aarch64 - target: aarch64-pc-windows-msvc - os: windows-latest - cross: skip - tests: skip - install_target: true - - # - label: Windows i586 - # target: i586-pc-windows-msvc - # os: windows-latest - # cross: skip - # auto_splitting: skip - # install_target: true - - - label: Windows i686 - target: i686-pc-windows-msvc - os: windows-latest - cross: skip - auto_splitting: skip - install_target: true - - - label: Windows x86_64 - target: x86_64-pc-windows-msvc - os: windows-latest - cross: skip - - - label: Windows i686 gnu - target: i686-pc-windows-gnu - toolchain: stable-i686-pc-windows-gnu - os: windows-latest - cross: skip - auto_splitting: skip - install_target: true - - - label: Windows x86_64 gnu - target: x86_64-pc-windows-gnu - toolchain: stable-x86_64-pc-windows-gnu - os: windows-latest - cross: skip - install_target: true - - # Linux - - label: Linux i586 - target: i586-unknown-linux-gnu - auto_splitting: skip - # FIXME: rustls currently does not support i586. - networking: skip - - - label: Linux i586 musl - target: i586-unknown-linux-musl - auto_splitting: skip - dylib: skip - # FIXME: rustls currently does not support i586. - networking: skip - - - label: Linux i686 - target: i686-unknown-linux-gnu - auto_splitting: skip - - - label: Linux i686 musl - target: i686-unknown-linux-musl - auto_splitting: skip - dylib: skip - - - label: Linux x86_64 - target: x86_64-unknown-linux-gnu - - - label: Linux x86_64 musl - target: x86_64-unknown-linux-musl - dylib: skip - - # FIXME: We can't link anything without cross. - # - label: Linux x86_64 gnux32 - # target: x86_64-unknown-linux-gnux32 - # cross: skip - # install_target: true - # dylib: skip - - - label: Linux arm - target: arm-unknown-linux-gnueabi - auto_splitting: skip - - - label: Linux arm musl - target: arm-unknown-linux-musleabi - auto_splitting: skip - dylib: skip - - - label: Linux arm Hardware Float - target: arm-unknown-linux-gnueabihf - auto_splitting: skip - dylib: skip - - - label: Linux arm musl Hardware Float - target: arm-unknown-linux-musleabihf - auto_splitting: skip - dylib: skip - - - label: Linux armv5te - target: armv5te-unknown-linux-gnueabi - auto_splitting: skip - dylib: skip - - - label: Linux armv5te musl - target: armv5te-unknown-linux-musleabi - auto_splitting: skip - dylib: skip - - - label: Linux armv7 - target: armv7-unknown-linux-gnueabi - auto_splitting: skip - - - label: Linux armv7 musl - target: armv7-unknown-linux-musleabi - auto_splitting: skip - dylib: skip - - - label: Linux armv7 Hardware Float - target: armv7-unknown-linux-gnueabihf - auto_splitting: skip - - - label: Linux armv7 musl Hardware Float - target: armv7-unknown-linux-musleabihf - auto_splitting: skip - dylib: skip - - - label: Linux thumbv7neon - target: thumbv7neon-unknown-linux-gnueabihf - auto_splitting: skip - - - label: Linux aarch64 - target: aarch64-unknown-linux-gnu - - - label: Linux aarch64 musl - target: aarch64-unknown-linux-musl - dylib: skip - - - label: Linux powerpc - target: powerpc-unknown-linux-gnu - auto_splitting: skip - - - label: Linux powerpc64 - target: powerpc64-unknown-linux-gnu - auto_splitting: skip - - - label: Linux powerpc64le - target: powerpc64le-unknown-linux-gnu - auto_splitting: skip - - - label: Linux riscv64gc - target: riscv64gc-unknown-linux-gnu - - - label: Linux s390x - target: s390x-unknown-linux-gnu - software_rendering: skip - # FIXME: Somehow the rendering is messed up on s390x. I didn't look - # into what the problem is. Might be inaccurate floating point on - # this architecture. - - - label: Linux sparc64 - target: sparc64-unknown-linux-gnu - auto_splitting: skip - # FIXME: rustls currently does not support sparc64. - networking: skip - - # macOS - - label: macOS aarch64 - target: aarch64-apple-darwin - os: macos-latest - cross: skip - - - label: macOS x86_64 - target: x86_64-apple-darwin - os: macos-latest - cross: skip - install_target: true - - # iOS - - label: iOS aarch64 - target: aarch64-apple-ios - os: macOS-latest - cross: skip - dylib: skip - tests: skip - install_target: true - - - label: iOS x86_64 - target: x86_64-apple-ios - os: macOS-latest - cross: skip - dylib: skip - tests: skip - install_target: true - - # Android - - label: Android i686 - target: i686-linux-android - auto_splitting: skip - - - label: Android x86_64 - target: x86_64-linux-android - auto_splitting: skip - - - label: Android arm - target: arm-linux-androideabi - auto_splitting: skip - - - label: Android armv7 - target: armv7-linux-androideabi - auto_splitting: skip - - - label: Android thumbv7neon - target: thumbv7neon-linux-androideabi - auto_splitting: skip - - - label: Android aarch64 - target: aarch64-linux-android - auto_splitting: skip - - # Other Unixes - - label: FreeBSD i686 - target: i686-unknown-freebsd - tests: skip - - - label: FreeBSD x86_64 - target: x86_64-unknown-freebsd - tests: skip - - - label: illumos x86_64 - target: x86_64-unknown-illumos - tests: skip - - # FIXME: The target currently fails to link due to - # "ld: cannot find -lexecinfo" - # - label: NetBSD x86_64 - # target: x86_64-unknown-netbsd - # tests: skip - - - label: Solaris sparcv9 - target: sparcv9-sun-solaris - tests: skip - - # FIXME: The target got renamed and cross doesn't support it yet. - # - label: Solaris x86_64 - # target: x86_64-pc-solaris - # tests: skip - - # Testing other channels - - label: Windows Beta - target: x86_64-pc-windows-msvc - os: windows-latest - toolchain: beta - release: skip - cross: skip - - label: Windows Nightly target: x86_64-pc-windows-msvc os: windows-latest - toolchain: nightly - release: skip - cross: skip - - - label: Windows Beta gnu - target: x86_64-pc-windows-gnu - toolchain: beta-x86_64-pc-windows-gnu - release: skip - os: windows-latest - cross: skip - install_target: true - - - label: Windows Nightly gnu - target: x86_64-pc-windows-gnu - toolchain: nightly-x86_64-pc-windows-gnu - release: skip - os: windows-latest - cross: skip - install_target: true - - - label: Linux Beta - target: x86_64-unknown-linux-gnu - toolchain: beta - release: skip - - - label: Linux Nightly - target: x86_64-unknown-linux-gnu - toolchain: nightly - release: skip - - - label: macOS Beta - target: aarch64-apple-darwin - os: macOS-latest - toolchain: beta - release: skip - cross: skip - - - label: macOS Nightly - target: aarch64-apple-darwin - os: macOS-latest - toolchain: nightly + toolchain: nightly-2024-06-29 release: skip cross: skip @@ -574,24 +53,6 @@ jobs: cd ~/.cargo/bin tar -xzf cross-x86_64-unknown-linux-gnu.tar.gz - - name: Build Static Library - run: sh .github/workflows/build_static.sh - env: - TARGET: ${{ matrix.target }} - SKIP_CROSS: ${{ matrix.cross }} - IS_DEPLOY: ${{ startsWith(github.ref, 'refs/tags/') && (matrix.release_anyway != '' || !(startsWith(matrix.toolchain, 'nightly') || startsWith(matrix.toolchain, 'beta'))) }} - FEATURES: ${{ matrix.features }} - NO_STD: ${{ matrix.no_std }} - - - name: Build Shared Library - if: matrix.dylib == '' - run: sh .github/workflows/build_shared.sh - env: - TARGET: ${{ matrix.target }} - SKIP_CROSS: ${{ matrix.cross }} - IS_DEPLOY: ${{ startsWith(github.ref, 'refs/tags/') && (matrix.release_anyway != '' || !(startsWith(matrix.toolchain, 'nightly') || startsWith(matrix.toolchain, 'beta'))) }} - FEATURES: ${{ matrix.features }} - - name: Test if: matrix.tests == '' run: sh .github/workflows/test.sh @@ -608,118 +69,3 @@ jobs: with: name: Screenshots ${{ matrix.label }} path: target/renders - - - name: Prepare Release - if: startsWith(github.ref, 'refs/tags/') && matrix.release == '' - shell: bash - run: .github/workflows/before_deploy.sh - env: - OS_NAME: ${{ matrix.os }} - TARGET: ${{ matrix.target }} - - - name: Release - if: startsWith(github.ref, 'refs/tags/') && matrix.release == '' - uses: softprops/action-gh-release@v1 - with: - files: livesplit-core-*.* - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - bind_gen: - name: Generate bindings - runs-on: ubuntu-latest - steps: - - name: Checkout Commit - uses: actions/checkout@v4 - - - name: Install Rust - uses: hecrj/setup-rust-action@v2 - - - name: Generate bindings - run: | - cd capi/bind_gen - cargo run - cd ../.. - - clippy: - name: Check clippy lints - runs-on: ubuntu-latest - steps: - - name: Checkout Commit - uses: actions/checkout@v4 - - - name: Install Rust - uses: hecrj/setup-rust-action@v2 - with: - components: clippy - - - name: Run Clippy - run: cargo clippy --all-features - - format: - name: Check formatting - runs-on: ubuntu-latest - steps: - - name: Checkout Commit - uses: actions/checkout@v4 - - - name: Install Rust - uses: hecrj/setup-rust-action@v2 - with: - components: rustfmt - - - name: Run cargo fmt - run: cargo fmt -- --check || true - - bench: - name: Run benchmarks - runs-on: ubuntu-latest - env: - CRITERION_TOKEN: ${{ secrets.CRITERION_TOKEN }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Rust - uses: hecrj/setup-rust-action@v2 - - - name: Run benchmarks - run: | - # run benchmarks and save baseline to "criterion.dev.temp" - cargo bench --all-features -- --verbose --noplot --save-baseline criterion.dev.temp - - # # set the path to the file to upload to criterion.dev - # echo "CRITERION_FILE_PATH=$(find ./target/criterion/ -name raw.csv)" >> $GITHUB_ENV - - # - name: Upload benchmarks - # run: | - # # upload the file - # curl -F 'raw.csv=@${{ env.CRITERION_FILE_PATH }}' \ - # 'https://api.criterion.dev/v1/${{ github.repository }}/measurements?token=${{ secrets.CRITERION_TOKEN }}&commit=${{ github.sha }}' - - docs: - name: Generate documentation - if: startsWith(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Use Node 10 - uses: actions/setup-node@v1 - with: - node-version: '10.x' - - name: Build TypeScript documentation - run: | - cd capi/js - make docs - cd ../.. - - name: Upload documentation files - run: | - git config --global user.email "action@github.com" - git config --global user.name "GitHub Action" - git clone -q "https://github.com/LiveSplit/livesplit-core-docs" - cd livesplit-core-docs - rm -r * - mv ../docs/* . - git add . - git commit --amend -m "Update documentation" - git push --force https://action:${{ secrets.LIVESPLIT_CORE_DOCS_UPLOAD }}@github.com/LiveSplit/livesplit-core-docs.git From 797b3095a682c334b4890000eb784a16cdaf4abf Mon Sep 17 00:00:00 2001 From: Christopher Serr Date: Tue, 9 Jul 2024 20:52:20 +0200 Subject: [PATCH 2/8] 25 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 053283b4..cc282efe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - label: Windows Nightly target: x86_64-pc-windows-msvc os: windows-latest - toolchain: nightly-2024-06-29 + toolchain: nightly-2024-06-25 release: skip cross: skip From 2f02f48cb78f89fca0e3b3a00908f1f224e71f61 Mon Sep 17 00:00:00 2001 From: Christopher Serr Date: Tue, 9 Jul 2024 20:58:20 +0200 Subject: [PATCH 3/8] 27 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc282efe..b708c50d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - label: Windows Nightly target: x86_64-pc-windows-msvc os: windows-latest - toolchain: nightly-2024-06-25 + toolchain: nightly-2024-06-27 release: skip cross: skip From ead9a097244daa04bad1716e7c1983b1350731a9 Mon Sep 17 00:00:00 2001 From: Christopher Serr Date: Tue, 9 Jul 2024 20:59:03 +0200 Subject: [PATCH 4/8] 26 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b708c50d..96e90afa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - label: Windows Nightly target: x86_64-pc-windows-msvc os: windows-latest - toolchain: nightly-2024-06-27 + toolchain: nightly-2024-06-26 release: skip cross: skip From 3d780baa42d36fbcef7a47507ebc5e61ee4bb652 Mon Sep 17 00:00:00 2001 From: Christopher Serr Date: Tue, 9 Jul 2024 21:06:56 +0200 Subject: [PATCH 5/8] 28 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96e90afa..0bd1e739 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - label: Windows Nightly target: x86_64-pc-windows-msvc os: windows-latest - toolchain: nightly-2024-06-26 + toolchain: nightly-2024-06-28 release: skip cross: skip From f7b685068751b2e8e84fcbf6dfb9d66831e76bb1 Mon Sep 17 00:00:00 2001 From: Christopher Serr Date: Tue, 9 Jul 2024 21:19:12 +0200 Subject: [PATCH 6/8] LLD? --- .cargo/config.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index a5ef39ca..339b2270 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,2 @@ [target.wasm32-wasi] runner = "wasmtime run --dir ." - -[target.x86_64-pc-windows-msvc] -linker = "rust-lld" From 2340fd1801f6fa12419f749053eddd7c3ad8f95b Mon Sep 17 00:00:00 2001 From: Christopher Serr Date: Tue, 9 Jul 2024 21:19:45 +0200 Subject: [PATCH 7/8] No LLD 29 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0bd1e739..053283b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - label: Windows Nightly target: x86_64-pc-windows-msvc os: windows-latest - toolchain: nightly-2024-06-28 + toolchain: nightly-2024-06-29 release: skip cross: skip From a85beb66430e3af8a47aa29738a0d7b073f2d372 Mon Sep 17 00:00:00 2001 From: Christopher Serr Date: Tue, 9 Jul 2024 21:35:10 +0200 Subject: [PATCH 8/8] bisect rustc --- .github/workflows/build.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 053283b4..5536e014 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,15 +53,20 @@ jobs: cd ~/.cargo/bin tar -xzf cross-x86_64-unknown-linux-gnu.tar.gz - - name: Test - if: matrix.tests == '' - run: sh .github/workflows/test.sh - env: - TARGET: ${{ matrix.target }} - SKIP_CROSS: ${{ matrix.cross }} - SKIP_AUTO_SPLITTING: ${{ matrix.auto_splitting }} - SKIP_NETWORKING: ${{ matrix.networking }} - SKIP_SOFTWARE_RENDERING: ${{ matrix.software_rendering }} + - name: Install bisect + run: | + cargo install cargo-bisect-rustc + cargo bisect-rustc --start=9c3bc805d --end=e9e6e2e44 -- test --all-features + + # - name: Test + # if: matrix.tests == '' + # run: sh .github/workflows/test.sh + # env: + # TARGET: ${{ matrix.target }} + # SKIP_CROSS: ${{ matrix.cross }} + # SKIP_AUTO_SPLITTING: ${{ matrix.auto_splitting }} + # SKIP_NETWORKING: ${{ matrix.networking }} + # SKIP_SOFTWARE_RENDERING: ${{ matrix.software_rendering }} - name: Upload screenshots if: matrix.tests == '' && (success() || failure())