From 5f6e12148fa2f003ac3801a93c73ea122c098c80 Mon Sep 17 00:00:00 2001 From: mubarak23 Date: Wed, 27 Mar 2024 18:08:25 +0100 Subject: [PATCH] fix merge conflict --- .github/workflows/gcc12.yml | 102 ++++++++++++++-------------- .github/workflows/m68k.yml | 124 +++++++++++++++++----------------- .github/workflows/release.yml | 87 ++++++++++++------------ .github/workflows/stdarch.yml | 121 ++++++++++++++++----------------- 4 files changed, 217 insertions(+), 217 deletions(-) diff --git a/.github/workflows/gcc12.yml b/.github/workflows/gcc12.yml index f7bb1560492..3ca45861c8a 100644 --- a/.github/workflows/gcc12.yml +++ b/.github/workflows/gcc12.yml @@ -10,7 +10,7 @@ permissions: env: # Enable backtraces for easier debugging RUST_BACKTRACE: 1 - TEST_FLAGS: "-Cpanic=abort -Zpanic-abort-tests" + TEST_FLAGS: '-Cpanic=abort -Zpanic-abort-tests' # FIXME(antoyo): we need to set GCC_EXEC_PREFIX so that the linker can find the linker plugin. # Not sure why it's not found otherwise. GCC_EXEC_PREFIX: /usr/lib/gcc/ @@ -23,66 +23,66 @@ jobs: fail-fast: false matrix: commands: [ - "--mini-tests", - "--std-tests", - # FIXME: re-enable asm tests when GCC can emit in the right syntax. - # "--asm-tests", - "--test-libcore", - "--test-successful-rustc --nb-parts 2 --current-part 0", - "--test-successful-rustc --nb-parts 2 --current-part 1", - ] + '--mini-tests', + '--std-tests', + # FIXME: re-enable asm tests when GCC can emit in the right syntax. + # "--asm-tests", + '--test-libcore', + '--test-successful-rustc --nb-parts 2 --current-part 0', + '--test-successful-rustc --nb-parts 2 --current-part 1', + ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - # `rustup show` installs from rust-toolchain.toml - - name: Setup rust toolchain - run: rustup show + # `rustup show` installs from rust-toolchain.toml + - name: Setup rust toolchain + run: rustup show - - name: Setup rust cache - uses: Swatinem/rust-cache@v2 + - name: Setup rust cache + uses: Swatinem/rust-cache@v2 - - name: Install packages - # `llvm-14-tools` is needed to install the `FileCheck` binary which is used for asm tests. - run: sudo apt-get install ninja-build ripgrep llvm-14-tools libgccjit-12-dev + - name: Install packages + # `llvm-14-tools` is needed to install the `FileCheck` binary which is used for asm tests. + run: sudo apt-get install ninja-build ripgrep llvm-14-tools libgccjit-12-dev - - name: Setup path to libgccjit - run: echo 'gcc-path = "/usr/lib/gcc/x86_64-linux-gnu/12"' > config.toml + - name: Setup path to libgccjit + run: echo 'gcc-path = "/usr/lib/gcc/x86_64-linux-gnu/12"' > config.toml - - name: Set env - run: | - echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV - echo "LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/12" >> $GITHUB_ENV - echo "LD_LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/12" >> $GITHUB_ENV + - name: Set env + run: | + echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV + echo "LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/12" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/12" >> $GITHUB_ENV - #- name: Cache rust repository + #- name: Cache rust repository ## We only clone the rust repository for rustc tests #if: ${{ contains(matrix.commands, 'rustc') }} #uses: actions/cache@v3 #id: cache-rust-repository #with: - #path: rust - #key: ${{ runner.os }}-packages-${{ hashFiles('rust/.git/HEAD') }} - - - name: Build - run: | - ./y.sh prepare --only-libcore --libgccjit12-patches - ./y.sh build --no-default-features --sysroot-panic-abort - cargo test --no-default-features - ./y.sh clean all - - - name: Prepare dependencies - run: | - git config --global user.email "user@example.com" - git config --global user.name "User" - ./y.sh prepare --libgccjit12-patches - - - name: Add more failing tests for GCC 12 - run: cat tests/failing-ui-tests12.txt >> tests/failing-ui-tests.txt - - - name: Add more failing tests because the sysroot is not compiled with LTO - run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt - - - name: Run tests - run: | - ./y.sh test --release --clean --build-sysroot ${{ matrix.commands }} --no-default-features + #path: rust + #key: ${{ runner.os }}-packages-${{ hashFiles('rust/.git/HEAD') }} + + - name: Build + run: | + ./y.sh prepare --only-libcore --libgccjit12-patches + ./y.sh build --no-default-features --sysroot-panic-abort --sysroot + cargo test --no-default-features + ./y.sh clean all + + - name: Prepare dependencies + run: | + git config --global user.email "user@example.com" + git config --global user.name "User" + ./y.sh prepare --libgccjit12-patches + + - name: Add more failing tests for GCC 12 + run: cat tests/failing-ui-tests12.txt >> tests/failing-ui-tests.txt + + - name: Add more failing tests because the sysroot is not compiled with LTO + run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt + + - name: Run tests + run: | + ./y.sh test --release --clean --build-sysroot ${{ matrix.commands }} --no-default-features diff --git a/.github/workflows/m68k.yml b/.github/workflows/m68k.yml index a8c6b614ce8..f43a086291a 100644 --- a/.github/workflows/m68k.yml +++ b/.github/workflows/m68k.yml @@ -23,87 +23,87 @@ jobs: fail-fast: false matrix: commands: [ - "--mini-tests", - "--std-tests", - # TODO(antoyo): fix those on m68k. - #"--test-libcore", - #"--extended-rand-tests", - #"--extended-regex-example-tests", - #"--extended-regex-tests", - #"--test-successful-rustc --nb-parts 2 --current-part 0", - #"--test-successful-rustc --nb-parts 2 --current-part 1", - #"--test-failing-rustc", - ] + '--mini-tests', + '--std-tests', + # TODO(antoyo): fix those on m68k. + #"--test-libcore", + #"--extended-rand-tests", + #"--extended-regex-example-tests", + #"--extended-regex-tests", + #"--test-successful-rustc --nb-parts 2 --current-part 0", + #"--test-successful-rustc --nb-parts 2 --current-part 1", + #"--test-failing-rustc", + ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - # `rustup show` installs from rust-toolchain.toml - - name: Setup rust toolchain - run: rustup show + # `rustup show` installs from rust-toolchain.toml + - name: Setup rust toolchain + run: rustup show - - name: Setup rust cache - uses: Swatinem/rust-cache@v2 + - name: Setup rust cache + uses: Swatinem/rust-cache@v2 - - name: Install packages - run: | - sudo apt-get update - sudo apt-get install qemu qemu-user-static + - name: Install packages + run: | + sudo apt-get update + sudo apt-get install qemu qemu-user-static - - name: Download artifact - run: curl -LO https://github.com/cross-cg-gcc-tools/cross-gcc/releases/latest/download/gcc-m68k-13.deb + - name: Download artifact + run: curl -LO https://github.com/cross-cg-gcc-tools/cross-gcc/releases/latest/download/gcc-m68k-13.deb - - name: Download VM artifact - uses: dawidd6/action-download-artifact@v2 - with: + - name: Download VM artifact + uses: dawidd6/action-download-artifact@v2 + with: workflow: m68k.yml name: debian-m68k repo: cross-cg-gcc-tools/vms branch: master event: push - - name: Setup path to libgccjit - run: | + - name: Setup path to libgccjit + run: | sudo dpkg -i gcc-m68k-13.deb echo 'gcc-path = "/usr/lib/"' > config.toml - - name: Set env - run: | - echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV - echo "LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV - echo "LD_LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV + - name: Set env + run: | + echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV + echo "LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV - #- name: Cache rust repository + #- name: Cache rust repository ## We only clone the rust repository for rustc tests #if: ${{ contains(matrix.commands, 'rustc') }} #uses: actions/cache@v3 #id: cache-rust-repository #with: - #path: rust - #key: ${{ runner.os }}-packages-${{ hashFiles('rust/.git/HEAD') }} - - - name: Prepare VM - run: | - mkdir vm - sudo mount debian-m68k.img vm - sudo cp $(which qemu-m68k-static) vm/usr/bin/ - - - name: Build - run: | - ./y.sh prepare --only-libcore --cross - ./y.sh build --target-triple m68k-unknown-linux-gnu - CG_GCC_TEST_TARGET=m68k-unknown-linux-gnu cargo test - ./y.sh clean all - - - name: Prepare dependencies - run: | - git config --global user.email "user@example.com" - git config --global user.name "User" - ./y.sh prepare --cross - - - name: Add more failing tests because the sysroot is not compiled with LTO - run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt - - - name: Run tests - run: | - ./y.sh test --release --clean --build-sysroot ${{ matrix.commands }} + #path: rust + #key: ${{ runner.os }}-packages-${{ hashFiles('rust/.git/HEAD') }} + + - name: Prepare VM + run: | + mkdir vm + sudo mount debian-m68k.img vm + sudo cp $(which qemu-m68k-static) vm/usr/bin/ + + - name: Build + run: | + ./y.sh prepare --only-libcore --cross + ./y.sh build --target-triple m68k-unknown-linux-gnu --sysroot + CG_GCC_TEST_TARGET=m68k-unknown-linux-gnu cargo test + ./y.sh clean all + + - name: Prepare dependencies + run: | + git config --global user.email "user@example.com" + git config --global user.name "User" + ./y.sh prepare --cross + + - name: Add more failing tests because the sysroot is not compiled with LTO + run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt + + - name: Run tests + run: | + ./y.sh test --release --clean --build-sysroot ${{ matrix.commands }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60a71d7d3dd..f65d3a1081f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,56 +18,57 @@ jobs: strategy: fail-fast: false matrix: - commands: [ - "--test-successful-rustc --nb-parts 2 --current-part 0", - "--test-successful-rustc --nb-parts 2 --current-part 1", - ] + commands: + [ + '--test-successful-rustc --nb-parts 2 --current-part 0', + '--test-successful-rustc --nb-parts 2 --current-part 1', + ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - # `rustup show` installs from rust-toolchain.toml - - name: Setup rust toolchain - run: rustup show + # `rustup show` installs from rust-toolchain.toml + - name: Setup rust toolchain + run: rustup show - - name: Setup rust cache - uses: Swatinem/rust-cache@v2 + - name: Setup rust cache + uses: Swatinem/rust-cache@v2 - - name: Install packages - run: sudo apt-get install ninja-build ripgrep + - name: Install packages + run: sudo apt-get install ninja-build ripgrep - - name: Download artifact - run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb + - name: Download artifact + run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb - - name: Setup path to libgccjit - run: | + - name: Setup path to libgccjit + run: | sudo dpkg --force-overwrite -i gcc-13.deb echo 'gcc-path = "/usr/lib/"' > config.toml - - name: Set env - run: | - echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV - echo "LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV - echo "LD_LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV - - - name: Build - run: | - ./y.sh prepare --only-libcore - EMBED_LTO_BITCODE=1 ./y.sh build --release --release-sysroot - cargo test - ./y.sh clean all - - - name: Prepare dependencies - run: | - git config --global user.email "user@example.com" - git config --global user.name "User" - ./y.sh prepare - - - name: Add more failing tests because of undefined symbol errors (FIXME) - run: cat tests/failing-lto-tests.txt >> tests/failing-ui-tests.txt - - - name: Run tests - run: | - # FIXME(antoyo): we cannot enable LTO for stdarch tests currently because of some failing LTO tests using proc-macros. - echo -n 'lto = "fat"' >> build_system/build_sysroot/Cargo.toml - EMBED_LTO_BITCODE=1 ./y.sh test --release --clean --release-sysroot --build-sysroot ${{ matrix.commands }} + - name: Set env + run: | + echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV + echo "LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV + + - name: Build + run: | + ./y.sh prepare --only-libcore + EMBED_LTO_BITCODE=1 ./y.sh build --release --release-sysroot --sysroot + cargo test + ./y.sh clean all + + - name: Prepare dependencies + run: | + git config --global user.email "user@example.com" + git config --global user.name "User" + ./y.sh prepare + # FIXME(antoyo): we cannot enable LTO for stdarch tests currently because of some failing LTO tests using proc-macros. + echo -n 'lto = "fat"' >> build_sysroot/Cargo.toml + + - name: Add more failing tests because of undefined symbol errors (FIXME) + run: cat tests/failing-lto-tests.txt >> tests/failing-ui-tests.txt + + - name: Run tests + run: | + EMBED_LTO_BITCODE=1 ./y.sh test --release --clean --release-sysroot --build-sysroot ${{ matrix.commands }} diff --git a/.github/workflows/stdarch.yml b/.github/workflows/stdarch.yml index dc52c94376c..3cfd1a861cd 100644 --- a/.github/workflows/stdarch.yml +++ b/.github/workflows/stdarch.yml @@ -18,27 +18,24 @@ jobs: strategy: fail-fast: false matrix: - cargo_runner: [ - "sde -future -rtm_mode full --", - "", - ] + cargo_runner: ['sde -future -rtm_mode full --', ''] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - # `rustup show` installs from rust-toolchain.toml - - name: Setup rust toolchain - run: rustup show + # `rustup show` installs from rust-toolchain.toml + - name: Setup rust toolchain + run: rustup show - - name: Setup rust cache - uses: Swatinem/rust-cache@v2 + - name: Setup rust cache + uses: Swatinem/rust-cache@v2 - - name: Install packages - run: sudo apt-get install ninja-build ripgrep + - name: Install packages + run: sudo apt-get install ninja-build ripgrep - - name: Install Intel Software Development Emulator - if: ${{ matrix.cargo_runner }} - run: | + - name: Install Intel Software Development Emulator + if: ${{ matrix.cargo_runner }} + run: | mkdir intel-sde cd intel-sde dir=sde-external-9.33.0-2024-01-07-lin @@ -50,49 +47,51 @@ jobs: sudo ln -s /usr/share/intel-sde/sde /usr/bin/sde sudo ln -s /usr/share/intel-sde/sde64 /usr/bin/sde64 - - name: Set env - run: | - echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV - echo 'download-gccjit = true' > config.toml - - - name: Build - run: | - ./y.sh prepare --only-libcore - ./y.sh build --release --release-sysroot - - - name: Set env (part 2) - run: | - # Set the `LD_LIBRARY_PATH` and `LIBRARY_PATH` env variables... - echo "LD_LIBRARY_PATH="$(./y.sh info | grep -v Using) >> $GITHUB_ENV - echo "LIBRARY_PATH="$(./y.sh info | grep -v Using) >> $GITHUB_ENV - - - name: Build (part 2) - run: | - cargo test - - - name: Clean - if: ${{ !matrix.cargo_runner }} - run: | - ./y.sh clean all - - - name: Prepare dependencies - run: | - git config --global user.email "user@example.com" - git config --global user.name "User" - ./y.sh prepare - - - name: Run tests - if: ${{ !matrix.cargo_runner }} - run: | - ./y.sh test --release --clean --release-sysroot --build-sysroot --mini-tests --std-tests --test-libcore - - - name: Run stdarch tests - if: ${{ !matrix.cargo_runner }} - run: | - CHANNEL=release TARGET=x86_64-unknown-linux-gnu CG_RUSTFLAGS="-Ainternal_features" cargo test --manifest-path build/build_sysroot/sysroot_src/library/stdarch/Cargo.toml - - - name: Run stdarch tests - if: ${{ matrix.cargo_runner }} - run: | - # FIXME: these tests fail when the sysroot is compiled with LTO because of a missing symbol in proc-macro. - STDARCH_TEST_EVERYTHING=1 CHANNEL=release CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER="${{ matrix.cargo_runner }}" TARGET=x86_64-unknown-linux-gnu CG_RUSTFLAGS="-Ainternal_features" cargo test --manifest-path build/build_sysroot/sysroot_src/library/stdarch/Cargo.toml -- --skip rtm --skip tbm --skip sse4a + - name: Set env + run: | + echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV + echo 'download-gccjit = true' > config.toml + + - name: Build + run: | + ./y.sh prepare --only-libcore + ./y.sh build --release --release-sysroot --sysroot + + - name: Set env (part 2) + run: | + # Set the `LD_LIBRARY_PATH` and `LIBRARY_PATH` env variables... + echo "LD_LIBRARY_PATH="$(./y.sh info | grep -v Using) >> $GITHUB_ENV + echo "LIBRARY_PATH="$(./y.sh info | grep -v Using) >> $GITHUB_ENV + + - name: Build (part 2) + run: | + cargo test + + - name: Clean + if: ${{ !matrix.cargo_runner }} + run: | + ./y.sh clean all + + - name: Prepare dependencies + run: | + git config --global user.email "user@example.com" + git config --global user.name "User" + ./y.sh prepare + + - name: Run tests + if: ${{ !matrix.cargo_runner }} + run: | + ./y.sh test --release --clean --release-sysroot --build-sysroot --mini-tests --std-tests --test-libcore + + - name: Run stdarch tests + if: ${{ !matrix.cargo_runner }} + run: | + cd build_sysroot/sysroot_src/library/stdarch/ + CHANNEL=release TARGET=x86_64-unknown-linux-gnu CG_RUSTFLAGS="-Ainternal_features" ../../../../y.sh cargo test + + - name: Run stdarch tests + if: ${{ matrix.cargo_runner }} + run: | + cd build_sysroot/sysroot_src/library/stdarch/ + # FIXME: these tests fail when the sysroot is compiled with LTO because of a missing symbol in proc-macro. + STDARCH_TEST_EVERYTHING=1 CHANNEL=release CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER="${{ matrix.cargo_runner }}" TARGET=x86_64-unknown-linux-gnu CG_RUSTFLAGS="-Ainternal_features" ../../../../y.sh cargo test -- --skip rtm --skip tbm --skip sse4a