Skip to content

Fix improper exception value fetching logic #18

Fix improper exception value fetching logic

Fix improper exception value fetching logic #18

Workflow file for this run

name: Build
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get install -y cmake libsdl2-dev libsdl2-ttf-dev libicu-dev libvterm-dev
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install cmake sdl2 sdl2_ttf icu4c libvterm
- name: Set environment variables for ICU (macOS)
if: runner.os == 'macOS'
run: |
echo "ICU_ROOT=$(brew --prefix icu4c)" >> $GITHUB_ENV
echo "LDFLAGS=-L$(brew --prefix icu4c)/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I$(brew --prefix icu4c)/include" >> $GITHUB_ENV
- name: Configure
run: |
cmake . -Bbuild/ -DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
cmake --build build/
- name: Upload build artifacts
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v2
with:
name: rv64gc_emu-${{ matrix.os }}
path: build/rv64gc_emu
create_release:
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Download build artifacts (Ubuntu)
uses: actions/download-artifact@v2
with:
name: rv64gc_emu-ubuntu-latest
path: build-ubuntu
- name: Download build artifacts (macOS)
uses: actions/download-artifact@v2
with:
name: rv64gc_emu-macOS-latest
path: build-macos
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.CREATE_RELEASE_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset (Ubuntu)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.CREATE_RELEASE_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build-ubuntu/rv64gc_emu
asset_name: rv64gc_emu_ubuntu
asset_content_type: application/octet-stream
- name: Upload Release Asset (macOS)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.CREATE_RELEASE_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build-macos/rv64gc_emu
asset_name: rv64gc_emu_macOS
asset_content_type: application/octet-stream