Skip to content

Commit 9ff39eb

Browse files
Artem Panfilovabrodkin
authored andcommitted
CI: add arc32 linux toolchain build
Signed-off-by: Artem Panfilov <[email protected]>
1 parent 4093855 commit 9ff39eb

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,26 @@ on:
66
pull_request:
77
branches: [master]
88
schedule:
9-
- cron: '0 0 * * *'
9+
- cron: "0 0 * * *"
1010
workflow_dispatch:
11+
repository_dispatch:
1112

1213
env:
1314
build_dir: ${{ github.workspace }}/output
1415

1516
jobs:
1617
build:
17-
name: Building ${{ matrix.toolchain.target }} toolchain
18+
name: Building ${{ matrix.target }}-${{ matrix.mode }} toolchain
1819
runs-on: ubuntu-18.04
1920

2021
strategy:
2122
fail-fast: false
2223
matrix:
23-
toolchain:
24-
- target: arc64-elf
25-
mode: newlib
26-
- target: arc64-linux
27-
mode: linux
24+
mode: [newlib, linux]
25+
target: [arc32, arc64]
26+
27+
exclude:
28+
- { mode: newlib, target: arc32 }
2829

2930
steps:
3031
- uses: actions/checkout@v2
@@ -49,28 +50,33 @@ jobs:
4950
patchutils \
5051
texinfo
5152
52-
- name: Build toolchain
53+
- name: Build ${{ matrix.target }}-${{ matrix.mode }} toolchain
5354
id: build_toolchain
5455
run: |
55-
echo "::set-output name=toolchain_name::${{ matrix.toolchain.target }}-nightly-$(date --utc '+%Y.%m.%d')"
56+
echo ::set-output name=toolchain_name::${{ matrix.target }}-${{ matrix.mode }}-nightly-$(date --utc '+%Y.%m.%d')
57+
58+
if [ "${{ matrix.mode }}" == "linux" ]; then
59+
BUILD_FLAGS="--enable-linux"
60+
else
61+
BUILD_FLAGS="--enable-multilib"
62+
fi
5663
57-
./configure \
58-
--target=${{ matrix.toolchain.target }} \
64+
${{ github.workspace }}/configure \
65+
${BUILD_FLAGS} \
66+
--target=${{ matrix.target }} \
5967
--prefix=${{ env.build_dir }} \
60-
--enable-multilib \
6168
--disable-qemu \
6269
--disable-werror
6370
64-
make ${{ matrix.toolchain.mode }} -j$(nproc)
71+
make ${{ matrix.mode }} -j$(nproc)
6572
6673
- name: Create toolchain archive
67-
if: github.event_name == 'schedule'
6874
run: |
6975
tar -czvf ${{ steps.build_toolchain.outputs.toolchain_name }}.tar.gz --owner=0 --group=0 -C ${{ env.build_dir }} .
7076
7177
- name: Upload artifacts
72-
if: github.event_name == 'schedule'
7378
uses: actions/upload-artifact@v2
7479
with:
7580
name: ${{ steps.build_toolchain.outputs.toolchain_name }}
7681
path: ${{ steps.build_toolchain.outputs.toolchain_name }}.tar.gz
82+
retention-days: 7

0 commit comments

Comments
 (0)