forked from EEESlab/tricore-gcc-toolchain-11.3.0
-
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
Showing
3 changed files
with
95 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,40 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'feature/**' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Toolchain build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install dependencies | ||
run: sudo ./install-deps | ||
|
||
- name: Build | ||
run: ./build-toolchain | ||
|
||
- name: Package | ||
run: | | ||
cd ./INSTALL | ||
zip -r9 ../linux.zip . | ||
cd ../INSTALL-WIN | ||
zip -r9X ../win32.zip . | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
if-no-files-found: error | ||
name: tricore-gcc-artifacts | ||
path: ./*.zip |
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,42 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Publish Release artifacts | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Extract commit SHA | ||
shell: bash | ||
run: | | ||
echo "SHORT_SHA=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | ||
- name: Download artifacts from latest workflow | ||
uses: dawidd6/action-download-artifact@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
workflow: build.yml | ||
branch: ${{ github.event.release.target_commitish }} | ||
workflow_conclusion: success | ||
skip_unpack: false | ||
|
||
- name: Rename build artifacts | ||
run: | | ||
mv tricore-gcc-artifacts/linux.zip tricore-gcc-11.3.1-${{ env.SHORT_SHA }}-linux.zip | ||
mv tricore-gcc-artifacts/win32.zip tricore-gcc-11.3.1-${{ env.SHORT_SHA }}-win32.zip | ||
- name: Push release artifacts | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: | | ||
*.zip |
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,13 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ ! -f /etc/lsb_release ] && [ ! -f /etc/debian_version ] | ||
then | ||
echo "Script is meant to install packages on Debian/Ubuntu based distributions" | ||
echo "Pleas install dependencies manually on other distributions" | ||
exit 1 | ||
fi | ||
|
||
apt-get update | ||
apt-get -y install build-essential build-essential gcc-mingw-w64 g++-mingw-w64 texinfo flex bison libmpfr-dev libgmp-dev libmpc-dev zip |