Skip to content

Commit 317fc20

Browse files
committed
Cleanup and simplification
Simplify workflows It looks like clang works out of the box. Try not installing risc-v toolchain after all.
1 parent 8952ab5 commit 317fc20

File tree

3 files changed

+8
-31
lines changed

3 files changed

+8
-31
lines changed

.github/workflows/build_and_release.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,8 @@ jobs:
7070

7171
- uses: actions/checkout@v4
7272

73-
- name: Install ninja and riscv-tools
74-
if: matrix.os == 'ubuntu'
75-
run: |
76-
sudo apt update
77-
sudo apt-get -y install ninja-build gcc-riscv64-unknown-elf
78-
79-
- name: Install ninja and riscv-tools
80-
if: matrix.os == 'macos'
81-
run: |
82-
brew install ninja
83-
brew tap riscv-software-src/riscv
84-
brew install riscv-tools
73+
- name: Install ninja
74+
uses: lukka/[email protected]
8575

8676
- name: Download source
8777
run: ./clone.sh
@@ -92,7 +82,7 @@ jobs:
9282
- name: Build toolchain
9383
run: ./build.sh
9484

95-
# Push in the Github environment variable the name of the artifact
85+
# Push the name of the artifact into the Github environment variable
9686
- run: ./config.sh -artifact_name
9787

9888
- name: Package toolchain

.github/workflows/ci.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- runner: macos-13
2323
os: macos
2424
runs-on: ${{ matrix.runner }}
25+
timeout-minutes: 120
2526
steps:
2627
- name: Install nightly toolchain
2728
id: rustc-toolchain
@@ -43,24 +44,12 @@ jobs:
4344
path: toolchain
4445

4546
- name: Check out athenavm/athena
46-
uses: actions/checkout@v3
47+
uses: actions/checkout@v4
4748
with:
4849
repository: athenavm/athena
4950
ref: main
5051
path: athena
5152

52-
- name: Install riscv-tools
53-
if: matrix.os == 'ubuntu'
54-
run: |
55-
sudo apt update
56-
sudo apt-get -y install gcc-riscv64-unknown-elf
57-
58-
- name: Install riscv-tools
59-
if: matrix.os == 'macos'
60-
run: |
61-
brew tap riscv-software-src/riscv
62-
brew install riscv-tools
63-
6453
- name: Build
6554
run:
6655
GITHUB_ACTIONS=false ATHENA_BUILD_DIR=$GITHUB_WORKSPACE/toolchain cargo run --bin cargo-athena -- athena

build.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ set -euo pipefail
55
source config.sh
66

77
# Fail fast if these tools aren't properly installed and in the path
8-
need_cmd riscv32-unknown-elf-clang
9-
need_cmd riscv32-unknown-elf-clang++
8+
need_cmd clang
9+
need_cmd clang++
1010

1111
# Rust requires a custom target file to exist for our custom target as part of the bootstrap build,
1212
# but it doesn't actually look at the contents.
1313
touch /tmp/riscv32em-athena-zkvm-elf.json
14+
export RUST_TARGET_PATH="/tmp"
1415

1516
# Set environment variables to override compiler flags
1617
export CC_riscv32em_athena_zkvm_elf="clang"
@@ -26,9 +27,6 @@ export CARGO_TARGET_RISCV32EM_ATHENA_ZKVM_ELF_RUSTFLAGS="-Cpasses=loweratomic -C
2627
# Override the default target for compiler-rt
2728
export COMPILER_RT_DEFAULT_TARGET_TRIPLE="riscv32-unknown-elf"
2829

29-
# Force the use of our custom target spec
30-
export RUST_TARGET_PATH="/tmp"
31-
3230
# Prevent the build system from adding --target flag
3331
export RUSTC_TARGET_ARG=""
3432

0 commit comments

Comments
 (0)