sapling/.github/workflows/mononoke.yml
Lukasz Piatkowski e326cdb0bd GitHub Actions: fix running out of space on Ubuntu build workflow (#23)
Summary:
As per https://github.com/actions/virtual-environments/issues/709 there started to be some issies with Ubuntu envs running out of space. This should fix it.

Also our Cargo builds use a lot of space, changing them to be non-incremental and removing debug symbols keeps the build fast, but greatly reduces the disk space usage leaving us enough space on GitHub Actions virtual machines.
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/23

Reviewed By: farnz

Differential Revision: D22160020

Pulled By: lukaspiatkowski

fbshipit-source-id: c23393e310c15ebf5a18b80f0bb5f1f894d24849
2020-06-22 07:50:25 -07:00

114 lines
3.5 KiB
YAML

name: Mononoke CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
linux:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Check space
run: df -h
- name: Clean space as per https://github.com/actions/virtual-environments/issues/709
run: sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Check space
run: df -h
- name: Install Rust Stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal
- name: Build dependencies
run: python3 build/fbcode_builder/getdeps.py build --only-deps --src-dir=. mononoke
- name: Build mononoke
run: python3 build/fbcode_builder/getdeps.py build --no-deps --src-dir=. mononoke
- name: Check space
run: df -h
- name: Copy artifacts
run: python3 build/fbcode_builder/getdeps.py fixup-dyn-deps --src-dir=. mononoke _artifacts/linux
- uses: actions/upload-artifact@master
with:
name: mononoke
path: _artifacts
- name: Test mononoke
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. mononoke
- name: Check space
run: df -h
- name: Install Rust Beta
uses: actions-rs/toolchain@v1
with:
toolchain: beta
default: true
profile: minimal
- name: Test mononoke with beta toolchain
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. mononoke
continue-on-error: true
- name: Install Rust Nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
profile: minimal
- name: Test mononoke with nightly toolchain
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. mononoke
continue-on-error: true
- name: Check space
run: df -h
mac:
runs-on: macOS-latest
env:
DEVELOPER_DIR: /Applications/Xcode_10.3.app/Contents/Developer
steps:
- uses: actions/checkout@v1
- name: Check space
run: df -h
- name: Install Rust Stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal
- name: Build dependencies
run: python3 build/fbcode_builder/getdeps.py build --only-deps --src-dir=. mononoke
- name: Build mononoke
run: python3 build/fbcode_builder/getdeps.py build --no-deps --src-dir=. mononoke
- name: Check space
run: df -h
- name: Copy artifacts
run: python3 build/fbcode_builder/getdeps.py fixup-dyn-deps --src-dir=. mononoke _artifacts/mac
- uses: actions/upload-artifact@master
with:
name: mononoke
path: _artifacts
- name: Test mononoke
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. mononoke
- name: Check space
run: df -h
- name: Install Rust Beta
uses: actions-rs/toolchain@v1
with:
toolchain: beta
default: true
profile: minimal
- name: Test mononoke with beta toolchain
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. mononoke
continue-on-error: true
- name: Install Rust Nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
profile: minimal
- name: Test mononoke with nightly toolchain
run: python3 build/fbcode_builder/getdeps.py test --src-dir=. mononoke
continue-on-error: true
- name: Check space
run: df -h