Skip to content

Vs2022.1

Vs2022.1 #7

Workflow file for this run

name: build test and commit
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master ]
jobs:
build-linux-gnu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
name: [AMD64, i386, arm, aarch64]
include:
- name: i386
platformflags: -m32
- name: arm
platformtools: arm-linux-gnueabi
emulator: qemu-arm
- name: aarch64
platformtools: aarch64-linux-gnu
emulator: qemu-aarch64
# name: build-linux-gnu (${{matrix.name}})
env:
PLATFORMFLAGS: ${{matrix.platformflags}}
PLATFORM_PREFIX: ${{matrix.platformtools}}
EMULATOR: ${{matrix.emulator}}
steps:
- uses: actions/checkout@v4
- name: install multilib
run: sudo apt-get install --no-install-recommends -y gcc-multilib g++-multilib
if: ${{ matrix.name == 'i386' }}
- name: install qemu
if: matrix.emulator
run: sudo apt-get install --no-install-recommends -y qemu-user
- name: install abi lib
if: matrix.platformtools
run: sudo apt-get install --no-install-recommends -y gcc-${{matrix.platformtools}} g++-${{matrix.platformtools}}
- name: make
run: make all
- name: test
run: make test
- name: set abi name
run: echo abiname=$(make abiname) >> $GITHUB_ENV
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.abiname }}
path: lib/${{ env.abiname }}/libstackman.a
build-windows:
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
platform: [x86, x64, arm, arm64]
include:
- platform: x86
folder: Win32
native: yes
- platform: x64
folder: x64
native: yes
- platform: arm
folder: arm
- platform: arm64
folder: arm64
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
- name: build
run: msbuild.exe vs2022\stackman.sln /p:Platform=${{matrix.platform}}
- name: strip timestamps from lib
run: python tools/strip-lib.py lib/win_${{matrix.platform}}/stackman.lib
- name: rebuild after stripping
run: msbuild.exe vs2022\stackman.sln /p:Platform=${{matrix.platform}}
- name: test
if: ${{ matrix.native == 'yes' }}
run: vs2022\${{matrix.folder}}\Debug\test.exe
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: win_${{ matrix.platform }}
path: lib/win_${{matrix.platform}}/stackman.lib
commit-artifacts:
runs-on: ubuntu-latest
needs: [build-linux-gnu, build-windows]
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: lib
- name: Commit changes
run: |
git config --global user.name 'Automation tool'
git config --global user.email 'automation-tool@users.noreply.github.com'
git add lib/*.a lib/*.lib
git status
git diff-index --quiet HEAD || git commit -m "Automated build"
git push