ci: add build toolchain and project on mac#601
Conversation
91c569c to
124219c
Compare
| mkdir ~/toolchain-macos-i386 | ||
| git rev-parse --short HEAD > ~/toolchain-macos-i386/git-version | ||
| cd phoenix-rtos-build/toolchain/ | ||
| ./build-toolchain.sh i386-pc-phoenix $HOME/toolchain-macos-i386/ |
There was a problem hiding this comment.
add " everywhere where applicable (avoid errors on $HOME with spaces)
| uses: dawidd6/action-download-artifact@v2 | ||
| with: | ||
| workflow: build-toolchain.yml | ||
| path: /Users/runner |
There was a problem hiding this comment.
shouldn't this be some GITHUB env variable? Is this value future-proof?
There was a problem hiding this comment.
Now I use workspace dir
| echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH | ||
| echo "$(brew --prefix gnu-sed)/libexec/gnubin" >> $GITHUB_PATH | ||
|
|
||
| - name: Download toolchain |
There was a problem hiding this comment.
maybe add TODO: download from github packages/releases?
|
|
||
| - name: Build | ||
| run: | | ||
| TARGET=ia32-generic-qemu ./phoenix-rtos-build/build.sh clean all tests |
There was a problem hiding this comment.
!!!! do not build with clean !!!!
There was a problem hiding this comment.
done, I moved TARGET to env
| git rev-parse --short HEAD > ~/toolchain-macos-i386/git-version | ||
| cd phoenix-rtos-build/toolchain/ | ||
| ./build-toolchain.sh i386-pc-phoenix $HOME/toolchain-macos-i386/ | ||
| rm -rf ~/toolchain-macos-i386/*.patch ~/toolchain-macos-i386/binutils-* ~/toolchain-macos-i386/gcc-* |
There was a problem hiding this comment.
maybe explicitly compress only toolchain-macos-i386/i386-pc-phoenix dir instead of removing other files (more future-proof)
| cd phoenix-rtos-build/toolchain/ | ||
| ./build-toolchain.sh i386-pc-phoenix $HOME/toolchain-macos-i386/ | ||
| rm -rf ~/toolchain-macos-i386/*.patch ~/toolchain-macos-i386/binutils-* ~/toolchain-macos-i386/gcc-* | ||
| tar -C $HOME -cvf ~/toolchain-macos-i386.tar toolchain-macos-i386 |
There was a problem hiding this comment.
I would appreciate comment why compression here is not needed / useless
124219c to
3cdc62f
Compare
| matrix: | ||
| target: [ia32-generic-qemu] | ||
| include: | ||
| - toolchain: i386-pc-phoenix |
There was a problem hiding this comment.
I added toolchain to matrix. In future it will be easier to add other compilers.
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
3cdc62f to
267ae6c
Compare
|
I'm converting to draft until toolchain building issues are investigated. |
Description
Add build-toolchain workflow to build toolchain for macos host using github actions. Now it only includes i386 compiler and takes around 30 minutes to finish. Workflow can be triggered manually in
Actionstab, but we can also run it weekly or biweekly. The result is artifact with toolchain.Add nightly build on macos host for ia32-generic-qemu target that is triggered every 24 hours at 2 AM UTC+1. Toolchain is downloaded from the last build-toolchain workflow.
Also, for now, disable Azure SDK port on ia32-generic-qemu due to compile errors on macos. It requires more effort to make it compilable on mac.
Types of changes
How Has This Been Tested?
Checklist:
Special treatment