Skip to content

fix

fix #43

Workflow file for this run

name: Build
on:
push:
pull_request:
#schedule:
# - cron: '0 */2 * * *'
jobs:
build-linux:
runs-on: ubuntu-latest
timeout-minutes: 90
env:
OS_NAME: unknown
ARCH_NAME: unknown
DLL_NAME: libasyncprocess.so
RESULT_NAME: result-linux
RESULT_PATH: result-linux
RESULT_PATH_SUB: result-async/static
steps:
- uses: actions/checkout@v2
- name: Set environment variables
run: |
pwd
uname
uname -m
OS_NAME=`uname`
ARCH_NAME=`uname -m`
echo "OS_NAME=$OS_NAME" >> $GITHUB_ENV
echo "ARCH_NAME=$ARCH_NAME" >> $GITHUB_ENV
- name: Install
run: |
sudo apt-get install libtool automake
- name: Build
run: |
gcc -v
rm static/$ARCH_NAME/$OS_NAME/$DLL_NAME
./bootstrap
- name: Copy Result
if: always()
run: |
mkdir -p $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
cp static/$ARCH_NAME/$OS_NAME/$DLL_NAME $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
- name: Upload Result
if: always()
uses: actions/upload-artifact@v1
with:
name: ${{ env.RESULT_NAME }}
path: ${{ env.RESULT_PATH }}
build-linux-aarch64:
runs-on: ubuntu-latest
timeout-minutes: 90
env:
OS_NAME: Linux
ARCH_NAME: aarch64
DLL_NAME: libasyncprocess.so
RESULT_NAME: result-linux-aarch64
RESULT_PATH: result-linux-aarch64
RESULT_PATH_SUB: result-async/static
steps:
- uses: actions/checkout@v2
- name: Build on aarch64 (arm64)
id: runcmd
uses: uraimo/run-on-arch-action@v1.0.5
with:
architecture: aarch64
distribution: ubuntu18.04
run: |
apt-get update
apt-get -y install build-essential
apt-get -y install automake
apt-get -y install libtool
pwd
uname
uname -m
gcc -v
rm static/${{ env.ARCH_NAME }}/${{ env.OS_NAME }}/${{ env.DLL_NAME }}
./bootstrap
- name: Copy Result
if: always()
run: |
mkdir -p $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
cp static/$ARCH_NAME/$OS_NAME/$DLL_NAME $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
- name: Upload Result
if: always()
uses: actions/upload-artifact@v1
with:
name: ${{ env.RESULT_NAME }}
path: ${{ env.RESULT_PATH }}
build-osx:
runs-on: macos-latest
timeout-minutes: 90
env:
OS_NAME: unknown
ARCH_NAME: unknown
DLL_NAME: libasyncprocess.so
RESULT_NAME: result-osx
RESULT_PATH: result-osx
RESULT_PATH_SUB: result-async/static
steps:
- uses: actions/checkout@v2
- name: Set environment variables
run: |
pwd
uname
uname -m
OS_NAME=`uname`
ARCH_NAME=`uname -m`
echo "OS_NAME=$OS_NAME" >> $GITHUB_ENV
echo "ARCH_NAME=$ARCH_NAME" >> $GITHUB_ENV
- name: Install tools
run: |
brew install automake
#brew install libtool
which glibtoolize
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
which libtoolize
- name: Build
run: |
gcc -v
rm static/$ARCH_NAME/$OS_NAME/$DLL_NAME
./bootstrap
- name: Copy Result
if: always()
run: |
mkdir -p $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
cp static/$ARCH_NAME/$OS_NAME/$DLL_NAME $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
- name: Upload Result
if: always()
uses: actions/upload-artifact@v1
with:
name: ${{ env.RESULT_NAME }}
path: ${{ env.RESULT_PATH }}
build-windows:
runs-on: windows-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
arch: [x86_64, i686]
include:
- arch: x86_64
arch2: x86_64
bit: 64
- arch: i686
arch2: x86
bit: 32
env:
OS_NAME: windows
ARCH_NAME: ${{ matrix.arch2 }}
DLL_NAME: libasyncprocess.dll
RESULT_NAME: result-windows-${{ matrix.arch }}
RESULT_PATH: result-windows-${{ matrix.arch }}
RESULT_PATH_SUB: result-async/static
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW${{ matrix.bit }}
path-type: inherit
release: true
update: true
install: 'base-devel mingw-w64-${{ matrix.arch }}-toolchain'
- name: Run MSYS2 once
shell: msys2 {0}
run: |
pwd
echo $MSYSTEM
echo $MSYS2_PATH_TYPE
echo $PATH
uname
uname -m
- name: Build
shell: msys2 {0}
run: |
gcc -v
rm static/$ARCH_NAME/$OS_NAME/$DLL_NAME
./bootstrap
- name: Copy Result
if: always()
shell: msys2 {0}
run: |
mkdir -p $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
cp static/$ARCH_NAME/$OS_NAME/$DLL_NAME $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
- name: Upload Result
if: always()
uses: actions/upload-artifact@v1
with:
name: ${{ env.RESULT_NAME }}
path: ${{ env.RESULT_PATH }}