Skip to content

Commit

Permalink
try to get rust repo working
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Cross <sean@osdyne.com>
  • Loading branch information
xobs committed Jun 17, 2024
1 parent f42bd07 commit e754665
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,29 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: recursive
path: build

- name: Install Rust nightly toolchain ${{ steps.extract_rust_version.outputs.version }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ steps.extract_rust_version.outputs.version }}

- name: Determine nightly hash
shell: bash
run: |
export rustrevshort="$(rustc --version | awk -F '[\( ]+' '{print $3}')"
echo "rustrevshort=$rustrevshort" >> $GITHUB_OUTPUT
export rustrev="$(curl --silent \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/rust-lang/rust/commits/$rustrevshort" \
| grep "\"sha\":" \
| head -1 \
| cut -d'"' -f4)"
echo "rustrev=$rustrev" >> $GITHUB_OUTPUT
- name: Create riscv32imac-unknown-xous-elf sysroot
run: |
rm -rf $(rustc --print sysroot)/lib/rustlib/riscv32imac-unknown-xous-elf \
Expand All @@ -53,9 +68,24 @@ jobs:
git config --global user.email "user@example.com" \
&& git config --global user.name "CI Runner"
- name: Get

- name: Apply patches
run: |
cd build \
pwd \
&& ls \
&& cd build \
&& echo "rustrev: $rustrev" \
&& git init rust \
&& cd rust \
&& git remote add origin https://github.com/rust-lang/rust \
&& git config --local gc.auto 0 \
&& git -c protocol.version=2 fetch --no-tags --prune --progress --recurse-submodules --depth=1 origin $rustrev \
&& git checkout $rustrev \
&& git submodule sync --recursive \
&& git -c protocol.version=2 submodule update --init --force --depth=1 --recursive \
&& ls \
&& ls .. \
&& git am ../*.patch
- name: Build Rust libstd
Expand Down

0 comments on commit e754665

Please sign in to comment.