-
Notifications
You must be signed in to change notification settings - Fork 137
67 lines (59 loc) · 2.05 KB
/
build_flang_arm64.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
name: Flang build & test ARM64
on:
push:
branches: [ master ]
paths-ignore:
- '**/.github/workflows/build_flang.yml'
- '**/.github/workflows/build_flang_windows.yml'
pull_request:
branches: [ master ]
paths-ignore:
- '**/.github/workflows/build_flang.yml'
- '**/.github/workflows/build_flang_windows.yml'
jobs:
build_flang:
if: github.repository_owner == 'flang-compiler'
runs-on: self-hosted
env:
build_path: /home/github
install_prefix: /home/github/usr/local
container:
image: ghcr.io/${{ github.repository_owner}}/ubuntu-flang-${{ matrix.llvm_branch }}:latest
credentials:
username: github
strategy:
matrix:
target: [AArch64]
llvm_branch: [release_17x, release_18x]
steps:
- name: Check tools
run: |
git --version
cmake --version
make --version
${{ env.install_prefix }}/bin/clang --version
- name: Manual checkout to build in user's home dir (push)
if: github.ref == 'refs/heads/master'
run: |
cd ${{ env.build_path }}
git clone https://github.com/flang-compiler/flang.git
- name: Manual checkout to build in user's home dir (pull_request)
if: github.ref != 'refs/heads/master'
run: |
cd ${{ env.build_path }}
git clone https://github.com/flang-compiler/flang.git
cd flang
git fetch origin ${{github.ref}}:pr_branch
git checkout pr_branch
- name: Build and install flang & libpgmath
run: |
cd ${{ env.build_path }}/flang
./build-flang.sh -t ${{ matrix.target }} -p ${{ env.install_prefix }} -n `nproc --ignore=1` -v -l /home/root/classic-flang-llvm-project/llvm
- name: Copy llvm-lit
run: |
cd ${{ env.build_path }}/flang
cp /home/root/classic-flang-llvm-project/build/bin/llvm-lit build/flang/bin/.
- name: Test flang
run: |
cd ${{ env.build_path }}/flang/build/flang
make check-flang-long