From d7c4e633dedc0170b6443d75ac7d3b413849caee Mon Sep 17 00:00:00 2001 From: Domenico Iezzi Date: Tue, 23 Jul 2024 13:24:41 +0200 Subject: [PATCH] Add github action config --- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d59ea2c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: Build + +on: push + +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: Extract commit SHA + shell: bash + run: | + echo "SHORT_SHA=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" + echo $SHORT_SHA + + - name: Package + run: | + cd ./INSTALL + zip -r9 ../tricore-gcc-11.3.1-${{ env.SHORT_SHA }}-linux.zip . + cd ../INSTALL-WIN + zip -r9X ../tricore-gcc-11.3.1-${{ env.SHORT_SHA }}-win32.zip . + + + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: *.zip