Skip to content

Commit 91c569c

Browse files
author
Jakub Sarzyński
committed
ci: add build toolchain and project on mac
Add toolchain build workflow to build toolchain on macos host. It is triggered by workflow dispatch event. Add nightly build every 24 hours at 2 AM UTC+1 of ia32-generic-qemu target on macos host. Disable Azure SDK port on ia32-generic-qemu target due to compile errors. JIRA: CI-158
1 parent c49b86e commit 91c569c

File tree

3 files changed

+95
-1
lines changed

3 files changed

+95
-1
lines changed

.github/workflows/build-toolchain.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build toolchain
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-macos:
8+
name: build-macos-toolchain
9+
runs-on: macos-12
10+
steps:
11+
- name: Checkout the repository
12+
uses: actions/checkout@v3
13+
with:
14+
submodules: recursive
15+
16+
- name: Install denependecies
17+
run: |
18+
brew install bash coreutils autoconf automake genext2fs make wget gnu-sed
19+
echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
20+
echo "$(brew --prefix gnu-sed)/libexec/gnubin" >> $GITHUB_PATH
21+
22+
- name: Build toolchain
23+
run: |
24+
mkdir ~/toolchain-macos-i386
25+
git rev-parse --short HEAD > ~/toolchain-macos-i386/git-version
26+
cd phoenix-rtos-build/toolchain/
27+
./build-toolchain.sh i386-pc-phoenix $HOME/toolchain-macos-i386/
28+
rm -rf ~/toolchain-macos-i386/*.patch ~/toolchain-macos-i386/binutils-* ~/toolchain-macos-i386/gcc-*
29+
tar -C $HOME -cvf ~/toolchain-macos-i386.tar toolchain-macos-i386
30+
31+
- name: Upload toolchain artifacts
32+
uses: actions/upload-artifact@v3
33+
with:
34+
name: toolchain-macos-i386
35+
path: ~/toolchain-macos-i386.tar

.github/workflows/nightly.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Nightly
2+
3+
on:
4+
schedule:
5+
- cron: '0 1 * * *' # everyday at 02:00 UTC+1
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-macos:
10+
name: build-macos
11+
runs-on: macos-12
12+
outputs:
13+
build_result: ${{ steps.build.outcome }}
14+
strategy:
15+
matrix:
16+
target: ['ia32-generic-qemu']
17+
include:
18+
- target: 'ia32-generic-qemu'
19+
syspage: 'psh pc-ata uart16550'
20+
steps:
21+
- name: Install denependecies
22+
run: |
23+
brew install bash coreutils autoconf automake genext2fs make wget gnu-sed
24+
echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
25+
echo "$(brew --prefix gnu-sed)/libexec/gnubin" >> $GITHUB_PATH
26+
27+
- name: Download toolchain
28+
uses: dawidd6/action-download-artifact@v2
29+
with:
30+
workflow: build-toolchain.yml
31+
path: /Users/runner
32+
33+
- name: Install toolchain
34+
working-directory: /Users/runner/toolchain-macos-i386
35+
run: |
36+
tar -zvf toolchain-macos-i386.tar
37+
echo "$(pwd)/toolchain-macos-i386/i386-pc-phoenix/bin" >> $GITHUB_PATH
38+
39+
- name: Checkout the repository
40+
uses: actions/checkout@v3
41+
with:
42+
submodules: recursive
43+
44+
- name: Build
45+
run: |
46+
TARGET=ia32-generic-qemu ./phoenix-rtos-build/build.sh clean all tests
47+
48+
- name: Tar rootfs
49+
working-directory: _fs
50+
run: tar -cvf ../rootfs-${{ matrix.target }}.tar ${{ matrix.target }}/root
51+
52+
- name: Upload build artifacts
53+
uses: actions/upload-artifact@v3
54+
with:
55+
name: phoenix-rtos-${{ matrix.target }}-macos-host
56+
path: |
57+
_boot/${{ matrix.target }}
58+
rootfs-${{ matrix.target }}.tar
59+

_projects/ia32-generic-qemu/build.project

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Ports configuration - additional to the one from _targets
1414
#
1515
export PORTS_MBEDTLS=y
16-
export PORTS_AZURE_SDK=y
16+
export PORTS_AZURE_SDK=n # FIXME compiling on mac doesn't work
1717

1818

1919
b_image_project () {

0 commit comments

Comments
 (0)