-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add build toolchain and project on mac #601
base: master
Are you sure you want to change the base?
Conversation
91c569c
to
124219c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add "
everywhere where applicable (avoid errors on $HOME
with spaces)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
.github/workflows/nightly.yml
Outdated
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
workflow: build-toolchain.yml | ||
path: /Users/runner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be some GITHUB env variable? Is this value future-proof?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add TODO: download from github packages/releases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
.github/workflows/nightly.yml
Outdated
|
||
- name: Build | ||
run: | | ||
TARGET=ia32-generic-qemu ./phoenix-rtos-build/build.sh clean all tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!!!! do not build with clean
!!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe explicitly compress only toolchain-macos-i386/i386-pc-phoenix
dir instead of removing other files (more future-proof)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would appreciate comment why compression here is not needed / useless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
124219c
to
3cdc62f
Compare
matrix: | ||
target: [ia32-generic-qemu] | ||
include: | ||
- toolchain: i386-pc-phoenix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Actions
tab, 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