diff --git a/.github/workflows/build-test-release-tagged.yaml b/.github/workflows/build-test-release-tagged.yaml index 5eecf9d9..44fff105 100644 --- a/.github/workflows/build-test-release-tagged.yaml +++ b/.github/workflows/build-test-release-tagged.yaml @@ -4,27 +4,63 @@ on: tags: - v* jobs: - build-test-release: + build-test-release-x86_64: permissions: contents: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Build all targets. + - name: Build all targets x86-64. run: | make build-all RELEASE_BUILD=true - - name: Run unit tests across all targets. + - name: Run unit tests across all targets x86-64. run: | make test-all - name: Prepare scenarios to be released. run: | sudo apt install zip zip -r scenarios.zip scenarios - - name: Release Innovation Engine - uses: softprops/action-gh-release@v1 + mv bin/ie bin/ie-x86_64 + - name: releases the artifacts + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') with: - token: ${{ secrets.GITHUB_TOKEN }} - generate_release_notes: true files: | - ./bin/ie - ./scenarios.zip + bin/ie-x86_64 + scenarios.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + build-test-release-aarch64: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: uraimo/run-on-arch-action@v2 + name: Build all target aarch64. + id: build + with: + arch: aarch64 + distro: ubuntu_latest + run: | + apt-get update -q && DEBIAN_FRONTEND=noninteractive apt-get install -q -y build-essential git wget + wget https://go.dev/dl/go1.24.1.linux-arm64.tar.gz + tar -C /usr/local -xzf go1.24.1.linux-arm64.tar.gz + export PATH=$PATH:/usr/local/go/bin + go env + make build-all RELEASE_BUILD=true + - name: Run unit tests across all targets aarch64. + run: | + make test-all + - name: Rename aarch64 binary for release. + run: | + sudo mv bin/ie bin/ie-aarch64 + - name: releases the artifacts + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + bin/ie-aarch64 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build-test-release.yaml b/.github/workflows/build-test-release.yaml index e0a0148a..003a47b7 100644 --- a/.github/workflows/build-test-release.yaml +++ b/.github/workflows/build-test-release.yaml @@ -4,29 +4,65 @@ on: branches: - main jobs: - build-test-release: + build-test-release-x86_64: permissions: contents: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Build all targets. + - name: Build all targets x86-64. run: | make build-all RELEASE_BUILD=true - - name: Run unit tests across all targets. + - name: Run unit tests across all targets x86-64. run: | make test-all - name: Prepare scenarios to be released. run: | sudo apt install zip zip -r scenarios.zip scenarios - - name: Release Innovation Engine - uses: "marvinpinto/action-automatic-releases@latest" + mv bin/ie bin/ie-x86_64 + - name: releases the artifacts + uses: softprops/action-gh-release@v2 with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - title: "IE" - automatic_release_tag: "latest" + tag_name: latest prerelease: true files: | - ./bin/ie - ./scenarios.zip + bin/ie-x86_64 + scenarios.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + build-test-release-aarch64: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: uraimo/run-on-arch-action@v2 + name: Build all target aarch64. + id: build + with: + arch: aarch64 + distro: ubuntu_latest + run: | + apt-get update -q && DEBIAN_FRONTEND=noninteractive apt-get install -q -y build-essential git wget + wget https://go.dev/dl/go1.24.1.linux-arm64.tar.gz + tar -C /usr/local -xzf go1.24.1.linux-arm64.tar.gz + export PATH=$PATH:/usr/local/go/bin + go env + make build-all RELEASE_BUILD=true + - name: Run unit tests across all targets aarch64. + run: | + make test-all + - name: Rename aarch64 binary for release. + run: | + sudo mv bin/ie bin/ie-aarch64 + - name: releases the artifacts + uses: softprops/action-gh-release@v2 + with: + tag_name: latest + prerelease: true + files: | + bin/ie-aarch64 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 6adebcbb..236b0fbc 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ You can find all releases [here](https://github.com/Azure/InnovationEngine/relea ```bash VERSION="latest" -wget -q -O ie https://github.com/Azure/InnovationEngine/releases/download/$VERSION/ie +wget -q -O ie https://github.com/Azure/InnovationEngine/releases/download/$VERSION/ie-$(uname -m) # Setup permissions & move to the local bin chmod +x ie diff --git a/scripts/install_from_release.sh b/scripts/install_from_release.sh index 234a5e72..95d9991d 100644 --- a/scripts/install_from_release.sh +++ b/scripts/install_from_release.sh @@ -10,7 +10,7 @@ fi # Download the binary echo "Installing IE from the $RELEASE release..." -wget -q -O ie https://github.com/Azure/InnovationEngine/releases/download/"$RELEASE"/ie >/dev/null +wget -q -O ie https://github.com/Azure/InnovationEngine/releases/download/"$RELEASE"/ie-$(uname -m) >/dev/null # Setup permissions & move to the local bin chmod +x ie >/dev/null