Update GitHub workflows to .NET 8 #20
Workflow file for this run
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
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-microwalk: | |
runs-on: ubuntu-latest | |
steps: | |
# Create release | |
- uses: actions/checkout@v2 | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body_path: docs/github-release-template.md | |
draft: true | |
prerelease: false | |
# Build Microwalk | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build & Pack | |
run: | | |
dotnet publish Microwalk/Microwalk.csproj --configuration Release --output publish --no-self-contained | |
dotnet publish Microwalk.Plugins.PinTracer/Microwalk.Plugins.PinTracer.csproj --configuration Release --output publish --no-self-contained | |
dotnet publish Microwalk.Plugins.JavascriptTracer/Microwalk.Plugins.JavascriptTracer.csproj --configuration Release --output publish --no-self-contained | |
dotnet publish Microwalk.Plugins.QemuKernelTracer/Microwalk.Plugins.QemuKernelTracer.csproj --configuration Release --output publish --no-self-contained | |
cd publish | |
zip -r Microwalk.zip . | |
- name: Upload asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./publish/Microwalk.zip | |
asset_name: Microwalk.zip | |
asset_content_type: application/zip | |
# Build Pin | |
- name: Setup Pin SDK | |
run: | | |
wget -O pin.tar.gz https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.27-98718-gbeaa5d51e-gcc-linux.tar.gz | |
mkdir -p pin-sdk | |
tar -xf pin.tar.gz -C pin-sdk/ --strip-components=1 | |
- name: Compile PinTracer | |
run: | | |
pinDir=`pwd`/pin-sdk | |
cd PinTracer | |
mkdir -p obj-intel64 | |
make PIN_ROOT="$pinDir" obj-intel64/PinTracer.so | |
- name: Upload asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./PinTracer/obj-intel64/PinTracer.so | |
asset_name: PinTracer.so | |
asset_content_type: application/x-elf | |
build-containers: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
# From https://github.community/t/how-to-get-just-the-tag-name/16241/7 | |
- name: Extract pure version from tag | |
id: get_version | |
run: | | |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} | |
- name: Set up builder | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Microwalk Jalangi2 docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: | | |
ghcr.io/microwalk-project/microwalk:jalangi2 | |
ghcr.io/microwalk-project/microwalk:${{ steps.get_version.outputs.VERSION }}-jalangi2 | |
platforms: linux/amd64 | |
file: docker/jalangi2/Dockerfile | |
- name: Build and push Microwalk Pin docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: | | |
ghcr.io/microwalk-project/microwalk:pin | |
ghcr.io/microwalk-project/microwalk:${{ steps.get_version.outputs.VERSION }}-pin | |
platforms: linux/amd64 | |
file: docker/pin/Dockerfile |