build: simplify workflow

linux; switch to gcc to support older hlds builds as well
win32: switch to clang as default compiler
This commit is contained in:
dmitry 2021-09-12 13:04:05 +03:00
commit 28e9f44dee
No known key found for this signature in database
GPG key ID: 8297CE728B7A7E37
8 changed files with 72 additions and 120 deletions

View file

@ -12,21 +12,26 @@ on:
types: [published]
jobs:
build:
builds:
strategy:
matrix:
include:
- os: windows-latest
- type: windows
bin: yapb.dll
name: windows
opts: meson setup build --cross-file=x86-windows
- os: ubuntu-latest
- type: linux
bin: yapb.so
name: linux
clang: 12
opts: CXX=gcc-11 CXX_LD=gold meson setup build
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
- type: macos
bin: yapb.dylib
opts: meson setup build --cross-file=x86-darwin
name: ${{ matrix.type }}
runs-on: ubuntu-latest
container: j4sdk/x86-buildtools:latest
steps:
- name: Checkout Repository
@ -35,36 +40,9 @@ jobs:
fetch-depth: 0
submodules: true
- name: Setup Windows x86
if: startsWith (runner.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
- name: Setup Linux x86
if: startsWith (runner.os, 'linux')
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gcc-multilib g++-multilib libstdc++6 lib32stdc++6 \
libc6-dev libc6-dev-i386 linux-libc-dev linux-libc-dev:i386
echo "CXX=clang-${{ matrix.clang }}" >> $GITHUB_ENV
echo "CXX_LD=lld-${{ matrix.clang }}" >> $GITHUB_ENV
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Setup Meson
run: |
python -m pip install --upgrade meson ninja
- name: Configure Build
run: |
meson setup build
${{ matrix.opts }}
- name: Compile Source
run: |
@ -75,32 +53,6 @@ jobs:
with:
name: ${{ matrix.bin }}
path: build/${{ matrix.bin }}
macos:
name: macos
runs-on: ubuntu-latest
container: j4sdk/macross-x86:latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Configure Build
run: |
CXX_LD=/opt/osxcross/target/bin/i386-apple-darwin15-ld meson setup build --cross-file=x86-darwin
- name: Compile Source
run: |
meson compile -v -C build
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: yapb.dylib
path: build/yapb.dylib
publish:
if: |
@ -109,7 +61,7 @@ jobs:
name: publish
runs-on: ubuntu-latest
needs: [build, macos]
needs: [builds]
steps:
- name: Checkout Repository