-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (54 loc) · 1.86 KB
/
continuous-integration-workflow.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
on:
push:
pull_request:
jobs:
test:
name: build toolchain
runs-on: ubuntu-latest
steps:
- name: get latest build tools
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa -y
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y gperf help2man libtool-bin gcc-11 g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100
sudo update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-11 100
wget https://ftp.gnu.org/gnu/make/make-4.3.tar.gz
tar xvzf make-4.3.tar.gz
cd make-4.3
./configure
bash ./build.sh
sudo install ./make /usr/bin/make
cd ..
rm -rf make-4.3
rm -rf make-4.3.tar.gz
- name: build ct-ng
run: |
git clone --depth=1 https://github.com/crosstool-ng/crosstool-ng.git
cd crosstool-ng
./bootstrap
./configure --prefix=$PWD/.local/
make -j$(nproc)
make install
cp -r .local/ ..
cd ..
echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH
- name: build aarch64-unknown-linux-gnu toolchain
run: |
mkdir tc
cd tc
mkdir -p toolchains
export CT_PREFIX="toolchains"
wget https://github.com/yEsPaP/toolchain/raw/main/.config
sed -i -e '/CT_LOG_PROGRESS_BAR/s/y$/n/' .config
sed -i -e '/CT_LOCAL_TARBALLS_DIR/s/HOME/CT_TOP_DIR/' .config
sed -i -e '/CT_PREFIX_DIR/s/HOME/CT_TOP_DIR/' .config
ct-ng build.$(nproc)
tar -czf aarch64-unknown-linux-gnu.tar.gz toolchains/
- name: upload built toolchain
uses: actions/[email protected]
with:
name: aarch64-unknown-linux-gnu.tar.gz
path: tc/aarch64-unknown-linux-gnu.tar.gz