-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (70 loc) · 2.34 KB
/
build.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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- published
jobs:
build-ct-ng:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
config:
- target: x86_64-multilib-linux-musl
- target: arm-unknown-linux-musleabihf
- target: aarch64-unknown-linux-musl
steps:
- name: Download crosstool-ng
uses: actions/checkout@v2
with:
repository: crosstool-ng/crosstool-ng
ref: 810021d9125a66f6a7cd0862d59aab3d32252a9f
# ==== DEPENDENCIES ====
- name: Install crosstool-ng dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get install -y --no-install-recommends gcc g++ gperf bison flex texinfo help2man make libncurses5-dev python3-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip patch libstdc++6 rsync git
# ==== BUILD CROSSTOOL-NG FROM SOURCE ====
- name: Bootstrap
run: ./bootstrap
- name: Configure
run: |
./configure --prefix=$HOME/crosstool-ng
- name: Make
run: make
- name: Make install
run: make install
# ==== BUILD TOOLCHAIN ====
- name: Get Repo
uses: actions/checkout@v2
- name: Build toolchain
run: |
export PATH=$PATH:$HOME/crosstool-ng/bin
ls -la
cd ${{ matrix.config.target }}
ct-ng build
chmod +w $HOME/x-tools/${{ matrix.config.target }}
cp toolchain* $HOME/x-tools/${{ matrix.config.target }}
# ==== PACKAGE ====
- name: Package
run: tar cJf ${{ matrix.config.target }}.tar.xz -C $HOME/x-tools ${{ matrix.config.target }}
- name: Upload
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.config.target }}
path: ${{ matrix.config.target }}.tar.xz
- name: Upload Release
if: github.event.action == 'published'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ matrix.config.target }}.tar.xz
asset_name: ${{ matrix.config.target }}.tar.xz
asset_content_type: application/x-tar