-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2cb5c79
commit ac0091b
Showing
1 changed file
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ zephyr-binutils-2_35 ] | ||
pull_request: | ||
branches: [ zephyr-binutils-2_35 ] | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
build: | ||
name: Build ${{ matrix.target }} | ||
runs-on: [ self-hosted, linux, x64, large ] | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- arc-none-elf | ||
# - arc64-none-elf | ||
- arm-none-eabi | ||
- aarch64-none-elf | ||
- mips-none-elf | ||
- nios2-none-elf | ||
- riscv64-none-elf | ||
- sparc-none-elf | ||
- x86_64-none-elf | ||
- xtensa-none-elf | ||
|
||
steps: | ||
- name: Print environment information | ||
run: | | ||
uname -a | ||
df -h | ||
gcc --version | ||
ld --version | ||
make --version | ||
autoconf --version | ||
automake --version | ||
cmake --version | ||
flex --version | ||
bison --version | ||
- name: Check out source code | ||
uses: actions/checkout@v2 | ||
with: | ||
path: src | ||
|
||
- name: Create work directories | ||
run: | | ||
rm -rf build | ||
mkdir build | ||
rm -rf ${{ matrix.target }} | ||
mkdir ${{ matrix.target }} | ||
rm -rf upload | ||
mkdir upload | ||
- name: Configure binutils | ||
run: | | ||
cd build | ||
../src/configure \ | ||
--prefix=/ \ | ||
--target=${{ matrix.target }} \ | ||
--enable-ld=yes \ | ||
--enable-gold=no \ | ||
--enable-deterministic-archives \ | ||
--enable-multilib \ | ||
--disable-sim \ | ||
--disable-gdb \ | ||
--disable-nls | ||
- name: Build binutils | ||
run: | | ||
cd build | ||
make -j16 all | ||
make DESTDIR=${GITHUB_WORKSPACE}/${{ matrix.target }} install-strip | ||
- name: Archive artifact | ||
run: | | ||
cd upload | ||
tar -zcvf ${{ matrix.target }}.tar.gz --owner=0 --group=0 \ | ||
-C .. ${{ matrix.target }} | ||
- name: Upload artifact | ||
if: github.event_name != 'release' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: binutils_${{ matrix.target }} | ||
path: upload/${{ matrix.target }}.tar.gz | ||
|
||
- name: Upload release asset | ||
if: github.event_name == 'release' | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: upload/${{ matrix.target }}.tar.gz | ||
asset_name: ${{ matrix.target }}.tar.gz | ||
asset_content_type: application/octet-stream |