Skip to content

Commit

Permalink
Merge pull request #412 from tgross35/gha-update
Browse files Browse the repository at this point in the history
Switch from actions-rs to preinstalled rustup
  • Loading branch information
antoyo authored Jan 12, 2024
2 parents 5032d33 + 0fe5c7f commit 1a8e0c3
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 189 deletions.
38 changes: 7 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ jobs:
steps:
- uses: actions/checkout@v3

# `rustup show` installs from rust-toolchain.toml
- name: Setup rust toolchain
run: rustup show

- 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
Expand All @@ -63,30 +70,6 @@ jobs:
echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
- name: Cache cargo installed crates
uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: cargo-installed-crates2-ubuntu-latest

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo target dir
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}

#- name: Cache rust repository
## We only clone the rust repository for rustc tests
#if: ${{ contains(matrix.commands, 'rustc') }}
Expand All @@ -111,13 +94,6 @@ jobs:
git config --global user.name "User"
./y.sh prepare
# Compile is a separate step, as the actions-rs/cargo action supports error annotations
- name: Compile
uses: actions-rs/[email protected]
with:
command: build
args: --release

- name: Add more failing tests because the sysroot is not compiled with LTO
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt

Expand Down
38 changes: 7 additions & 31 deletions .github/workflows/failures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ jobs:
steps:
- uses: actions/checkout@v3

# `rustup show` installs from rust-toolchain.toml
- name: Setup rust toolchain
run: rustup show

- name: Setup rust cache
uses: Swatinem/rust-cache@v2

- name: Install packages
run: sudo apt-get install ninja-build ripgrep

Expand Down Expand Up @@ -71,30 +78,6 @@ jobs:
echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
- name: Cache cargo installed crates
uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: cargo-installed-crates2-ubuntu-latest

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo target dir
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}

#- name: Cache rust repository
#uses: actions/cache@v3
#id: cache-rust-repository
Expand All @@ -115,13 +98,6 @@ jobs:
if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
run: ./y.sh prepare

# Compile is a separate step, as the actions-rs/cargo action supports error annotations
- name: Compile
uses: actions-rs/[email protected]
with:
command: build
args: --release

- name: Add more failing tests because the sysroot is not compiled with LTO
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt

Expand Down
38 changes: 7 additions & 31 deletions .github/workflows/gcc12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ jobs:
steps:
- uses: actions/checkout@v3

# `rustup show` installs from rust-toolchain.toml
- name: Setup rust toolchain
run: rustup show

- 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
Expand All @@ -48,30 +55,6 @@ jobs:
echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
- name: Cache cargo installed crates
uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: cargo-installed-crates2-ubuntu-latest

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo target dir
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}

#- name: Cache rust repository
## We only clone the rust repository for rustc tests
#if: ${{ contains(matrix.commands, 'rustc') }}
Expand All @@ -94,13 +77,6 @@ jobs:
git config --global user.name "User"
./y.sh prepare --libgccjit12-patches
# Compile is a separate step, as the actions-rs/cargo action supports error annotations
- name: Compile
uses: actions-rs/[email protected]
with:
command: build
args: --release

- name: Add more failing tests for GCC 12
run: cat failing-ui-tests12.txt >> failing-ui-tests.txt

Expand Down
42 changes: 9 additions & 33 deletions .github/workflows/m68k.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,20 @@ jobs:
]

steps:
- uses: actions/checkout@v3

# `rustup show` installs from rust-toolchain.toml
- name: Setup rust toolchain
run: rustup show

- 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
- uses: actions/checkout@v3

- name: Download GCC artifact
uses: dawidd6/action-download-artifact@v2
with:
Expand Down Expand Up @@ -72,30 +79,6 @@ jobs:
echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
- name: Cache cargo installed crates
uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: cargo-installed-crates2-ubuntu-latest

#- name: Cache cargo registry
#uses: actions/cache@v3
#with:
#path: ~/.cargo/registry
#key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}

#- name: Cache cargo index
#uses: actions/cache@v3
#with:
#path: ~/.cargo/git
#key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo target dir
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}

#- name: Cache rust repository
## We only clone the rust repository for rustc tests
#if: ${{ contains(matrix.commands, 'rustc') }}
Expand Down Expand Up @@ -126,13 +109,6 @@ jobs:
git config --global user.name "User"
./y.sh prepare --cross
# Compile is a separate step, as the actions-rs/cargo action supports error annotations
- name: Compile
uses: actions-rs/[email protected]
with:
command: build
args: --release

- name: Add more failing tests because the sysroot is not compiled with LTO
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt

Expand Down
38 changes: 7 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ jobs:
steps:
- uses: actions/checkout@v3

# `rustup show` installs from rust-toolchain.toml
- name: Setup rust toolchain
run: rustup show

- name: Setup rust cache
uses: Swatinem/rust-cache@v2

- name: Install packages
run: sudo apt-get install ninja-build ripgrep

Expand All @@ -51,30 +58,6 @@ jobs:
echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
- name: Cache cargo installed crates
uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: cargo-installed-crates2-ubuntu-latest

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo target dir
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}

- name: Build
run: |
./y.sh prepare --only-libcore
Expand All @@ -92,13 +75,6 @@ jobs:
# 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
# Compile is a separate step, as the actions-rs/cargo action supports error annotations
- name: Compile
uses: actions-rs/[email protected]
with:
command: build
args: --release

- name: Add more failing tests because of undefined symbol errors (FIXME)
run: cat failing-lto-tests.txt >> failing-ui-tests.txt

Expand Down
39 changes: 7 additions & 32 deletions .github/workflows/stdarch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ jobs:
steps:
- uses: actions/checkout@v3

# `rustup show` installs from rust-toolchain.toml
- name: Setup rust toolchain
run: rustup show

- name: Setup rust cache
uses: Swatinem/rust-cache@v2

- name: Install packages
run: sudo apt-get install ninja-build ripgrep

Expand Down Expand Up @@ -65,30 +72,6 @@ jobs:
echo "LD_LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
- name: Cache cargo installed crates
uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: cargo-installed-crates2-ubuntu-latest

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo target dir
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}

- name: Build
run: |
./y.sh prepare --only-libcore
Expand All @@ -108,14 +91,6 @@ jobs:
git config --global user.name "User"
./y.sh prepare
# Compile is a separate step, as the actions-rs/cargo action supports error annotations
- name: Compile
uses: actions-rs/[email protected]
with:
command: build
# TODO: remove `--features master` when it is back to the default.
args: --release --features master

- name: Run tests
if: ${{ !matrix.cargo_runner }}
run: |
Expand Down

0 comments on commit 1a8e0c3

Please sign in to comment.