Skip to content

Merge pull request #49 from Xanderplayz16/errno #57

Merge pull request #49 from Xanderplayz16/errno

Merge pull request #49 from Xanderplayz16/errno #57

Workflow file for this run

name: Build and Release
# on:
# push:
# tags:
# - 'v*'
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ubuntu-latest
env:
DIR: ${{ github.workspace }}
CFLAGS: -g -Ofast -I${{ github.workspace }}/internal/obj/libffi/include
LDFLAGS: -L${{ github.workspace }}/internal/obj/libffi/lib ${{ github.workspace }}/internal/obj/libffi/lib/libffi.a -lm
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential autoconf automake libtool pkg-config gettext mingw-w64 mingw-w64-tools
- name: Build for Linux
run: |
make all
- name: Build for Windows
run: |
sudo apt-get install -y gcc-mingw-w64-x86-64
make windows
- name: Create release directory
run: |
mkdir -p release
- name: Move artifacts
run: |
cp tau release/tau-linux-amd64
cp tau.exe release/tau-windows-amd64.exe
- name: Upload Release Assets
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/')
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: release/tau-linux-amd64
asset_name: tau-linux-amd64
asset_content_type: application/octet-stream
- name: Upload Release Assets for Windows
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/')
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: release/tau-windows-amd64.exe
asset_name: tau-windows-amd64.exe
asset_content_type: application/octet-stream