forked from facebook/hhvm
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (65 loc) · 2.51 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Ubuntu CI
on:
push:
branches-ignore:
# Exclude the push event for exported diffs, because the CI for export
# should have been covered by GitHub Actions triggered by pull requests.
- 'export-D+'
pull_request:
concurrency:
# If the workflow is triggered by a pull request, then cancel previous runs
# for the same pull request, which share the same `github.ref`, otherwise the
# run ID is used to identify the concurrency group, which is a no-op because
# the run ID is always unique for each trigged event.
group: ubuntu-ci-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: true
# OUT needs to be global. Ideally it would be local to the job so we could
# store it in ${{ runner.temp }} instead of the checkout directory.
# Unfortunately this is hitting some GitHub Action inconsistency with `env`:
# https://github.com/actions/runner/issues/480
env:
OUT: ${{ format('{0}/out', github.workspace) }}
DEBIAN_FRONTEND: "noninteractive"
jobs:
build_ubuntu_focal_nightly:
runs-on: 16-core
container:
image: ubuntu:focal
env:
DISTRO: ubuntu-20.04-focal
IS_NIGHTLY: 1
CLANG_VERSION: 12
steps:
- name: Installing dependencies to bootstrap env
run: apt update -y && apt install -y git wget lsb-release software-properties-common gpg
- name: Installing llvm
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
# Note: Keep this version in sync with the one in the Debian control file.
./llvm.sh ${CLANG_VERSION}
- name: Making LLVM the default compiler
run: |
if [ -f /etc/alternatives/cc ]
then
update-alternatives --remove-all cc
fi
if [ -f /etc/alternatives/c++ ]
then
update-alternatives --remove-all c++
fi
update-alternatives --install /usr/bin/cc cc /usr/bin/clang++-${CLANG_VERSION} 500
update-alternatives --set cc /usr/bin/clang++-${CLANG_VERSION}
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${CLANG_VERSION} 500
update-alternatives --set c++ /usr/bin/clang++-${CLANG_VERSION}
- name: Fetching HHVM and its submodules
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Installing HHVM deps and building HHVM
run: ci/bin/make-debianish-package
- name: Uploading artifacts
uses: actions/upload-artifact@v3
with:
name: out-directory
path: ${{ env.OUT }}