-
Notifications
You must be signed in to change notification settings - Fork 25
149 lines (133 loc) · 5.19 KB
/
aocc-auto.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: hdf4 autotools aocc
# Triggers the workflow on a call from another workflow
on:
workflow_call:
inputs:
build_mode:
description: "release vs. debug build"
required: true
type: string
build_option:
description: "--enable-production or --disable-production"
required: true
type: string
permissions:
contents: read
jobs:
aocc_build_and_test:
name: "aocc ${{ inputs.build_mode }}"
runs-on: ubuntu-latest
steps:
- name: Get Sources
uses: actions/[email protected]
- name: Install Dependencies
shell: bash
run: |
sudo apt update
sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev
sudo apt install -y libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev
sudo apt install -y doxygen openssl libtool libtool-bin build-essential
sudo apt install -y libncurses-dev libquadmath0 libstdc++6 libxml2
- name: Install AOCC 4.2.0
shell: bash
run: |
wget https://download.amd.com/developer/eula/aocc/aocc-4-2/aocc-compiler-4.2.0.tar
tar -xvf aocc-compiler-4.2.0.tar
cd aocc-compiler-4.2.0
bash install.sh
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
which clang
which flang
clang -v
- name: Autotools Configure
shell: bash
run: |
export LD_LIBRARY_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib
export LD_RUN_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib
export PATH=/usr/local/bin:$PATH
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
$GITHUB_WORKSPACE/configure \
${{ inputs.build_option }} \
--enable-shared \
--disable-fortran \
LDFLAGS="-L/home/runner/work/hdf4/hdf4/aocc-compiler-4.2.0/lib"
- name: Autotools Build
shell: bash
run: |
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
export PATH=/usr/local/bin:$PATH
make -j3
working-directory: ${{ runner.workspace }}/build
- name: Autotools Run Tests
shell: bash
run: |
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
export PATH=/usr/local/bin:$PATH
make check -j2
working-directory: ${{ runner.workspace }}/build
- name: Autotools Install
shell: bash
run: |
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
export PATH=/usr/local/bin:$PATH
make install
working-directory: ${{ runner.workspace }}/build
aocc_static_build_and_test:
name: "aocc static ${{ inputs.build_mode }}"
runs-on: ubuntu-latest
steps:
- name: Get Sources
uses: actions/[email protected]
- name: Install Dependencies
shell: bash
run: |
sudo apt update
sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev doxygen openssl libtool libtool-bin build-essential libncurses-dev libquadmath0 libstdc++6 libxml2
- name: Install AOCC 4.2.0
shell: bash
run: |
wget https://download.amd.com/developer/eula/aocc/aocc-4-2/aocc-compiler-4.2.0.tar
tar -xvf aocc-compiler-4.2.0.tar
cd aocc-compiler-4.2.0
bash install.sh
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
which clang
which flang
clang -v
- name: Autotools Configure
shell: bash
run: |
export LD_LIBRARY_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib
export LD_RUN_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib
export PATH=/usr/local/bin:$PATH
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
$GITHUB_WORKSPACE/configure \
${{ inputs.build_option }} \
--disable-shared \
--enable-fortran \
LDFLAGS="-L/home/runner/work/hdf4/hdf4/aocc-compiler-4.2.0/lib"
- name: Autotools Build
shell: bash
run: |
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
export PATH=/usr/local/bin:$PATH
make -j3
working-directory: ${{ runner.workspace }}/build
- name: Autotools Run Tests
shell: bash
run: |
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
export PATH=/usr/local/bin:$PATH
make check -j2
working-directory: ${{ runner.workspace }}/build
- name: Autotools Install
shell: bash
run: |
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
export PATH=/usr/local/bin:$PATH
make install
working-directory: ${{ runner.workspace }}/build