-
Notifications
You must be signed in to change notification settings - Fork 323
47 lines (45 loc) · 1.45 KB
/
ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Ubuntu CI
on:
workflow_dispatch:
push:
branches: [main, dev]
pull_request:
types: [opened, reopened, synchronize]
jobs:
ubuntu:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
env:
NPROC: 2
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup cache
uses: actions/cache@v3
with:
# Ref: https://github.com/apache/incubator-mxnet/pull/18459/files
path: ~/.ccache
# We include the commit sha in the cache key, as new cache entries are
# only created if there is no existing entry for the key yet.
key: ${{ runner.os }}-ccache-${{ github.sha }}
# Restore any ccache cache entry, if none for
# ${{ runner.os }}-ccache-${{ github.sha }} exists.
# Common prefix will be used so that ccache can be used across commits.
restore-keys: |
${{ runner.os }}-ccache
- name: Set up Python version
uses: actions/setup-python@v4
with:
python-version: "3.11"
# Pre-installed packages: https://github.com/actions/runner-images/tree/main/images
- name: Install ccache
run: |
sudo apt-get --yes install ccache
ccache -M 2G # GitHub's total cache limit is 5GB for all OSes.
- name: Config and build
run: |
PATH=/usr/lib/ccache:$PATH
ccache -s
./ci/run_ci.sh
ccache -s