Skip to content

Commit

Permalink
Refactor into separate actions
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed Oct 25, 2024
1 parent 355f0a7 commit a4ca096
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 40 deletions.
33 changes: 33 additions & 0 deletions .github/actions/install-linux-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 'Install Linux Dependencies'
runs:
using: "composite"
steps:
- name: Free HDD space
run: |
echo "Listing 20 largest packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 20
df -h
sudo apt-get update
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^temurin-.*'
sudo apt-get remove -y azure-cli google-cloud-cli microsoft-edge-stable google-chrome-stable firefox powershell mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
df -h
echo "Removing large directories"
# deleting 15GB
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/lib/android
df -h
- name: Add LLVM Debian repository
uses: myci-actions/add-deb-repo@11
with:
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- name: Update and upgrade APT
- run: sudo apt-get update && sudo apt-get upgrade -y
- name: Install LLVM
run: sudo apt-get install llvm-19 llvm-19-dev llvm-19-runtime clang-19 clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools
15 changes: 15 additions & 0 deletions .github/actions/install-native-runtime/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Install Native Runtime'
runs:
using: "composite"
steps:
- name: Checkout Cairo Native
uses: actions/checkout@v4
with:
repository: lambdaclass/cairo_native
path: cairo_native
- name: Build Cairo Native Runtime Library
shell: bash
run: |
cd cairo_native
make runtime
echo "CAIRO_NATIVE_RUNTIME_LIBRARY=$(pwd)/libcairo_native_runtime.a" > $GITHUB_ENV
43 changes: 3 additions & 40 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,50 +23,13 @@ jobs:
matrix:
block: [742000]
steps:
- uses: actions/checkout@v4
- name: Free HDD space
run: |
echo "Listing 20 largest packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 20
df -h
sudo apt-get update
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^temurin-.*'
sudo apt-get remove -y azure-cli google-cloud-cli microsoft-edge-stable google-chrome-stable firefox powershell mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
df -h
echo "Removing large directories"
# deleting 15GB
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/lib/android
df -h
- uses: ./github/actions/install-linux-deps
- name: Setup rust env
uses: dtolnay/[email protected]
- uses: actions/checkout@v4
- name: Retreive cached dependecies
uses: Swatinem/rust-cache@v2
- name: Add LLVM Debian repository
uses: myci-actions/add-deb-repo@11
with:
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- run: sudo apt-get update && sudo apt-get upgrade -y
- name: Install LLVM
run: sudo apt-get install llvm-19 llvm-19-dev llvm-19-runtime clang-19 clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools
- name: Checkout cairo_native
uses: actions/checkout@v4
with:
repository: lambdaclass/cairo_native
path: cairo_native
- name: Build Cairo Native Runtime Library
shell: bash
run: |
cd cairo_native
make runtime
echo "CAIRO_NATIVE_RUNTIME_LIBRARY=$(pwd)/libcairo_native_runtime.a" > $GITHUB_ENV
- uses: ./github/actions/install-native-runtime
- name: Run with Native
run: |
BLOCK_START=${{ matrix.block }}
Expand Down

0 comments on commit a4ca096

Please sign in to comment.