-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
78 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Shared action | ||
runs: composite | ||
steps: | ||
- name: Freeing up more disk space | ||
- run: | | ||
sudo swapoff -a | ||
sudo rm -f /mnt/swapfile | ||
free -h | ||
docker rmi $(docker image ls -aq) | ||
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android | ||
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf /usr/local/share/boost | ||
sudo rm -rf /opt/hostedtoolcache | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
sudo apt-get remove -y 'php.*' --fix-missing | ||
sudo apt-get remove -y '^mongodb-.*' --fix-missing | ||
sudo apt-get remove -y '^mysql-.*' --fix-missing | ||
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing | ||
sudo apt-get remove -y google-cloud-sdk --fix-missing | ||
sudo apt-get remove -y google-cloud-cli --fix-missing | ||
sudo apt-get autoremove -y | ||
sudo apt-get clean | ||
df -h | ||
shell: bash | ||
- name: Install package | ||
run: | | ||
echo 'APT::Get::Always-Include-Phased-Updates "false";' | sudo tee /etc/apt/apt.conf.d/99-phased-updates | ||
sudo apt-get update && sudo apt-get upgrade -y | ||
sudo apt-get install -y protobuf-compiler libprotobuf-dev | ||
shell: bash | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
# Steps taken from https://github.com/actions/cache/blob/master/examples.md#rust---cargo | ||
- name: Cache cargo registry | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters