Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v2 | |
- 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@v2 | |
with: | |
name: ${{ env.abiname }} | |
path: lib/${{ env.abiname }}/libstackman.a | |
build-windows: | |
runs-on: windows-2019 | |
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@v2 | |
- uses: microsoft/[email protected] | |
- name: build | |
run: msbuild.exe vs2019\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 vs2019\stackman.sln /p:Platform=${{matrix.platform}} | |
- name: test | |
if: ${{ matrix.native == 'yes' }} | |
run: vs2019\${{matrix.folder}}\Debug\test.exe | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v2 | |
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@v2 | |
- uses: actions/[email protected] | |
with: | |
path: lib | |
- name: Commit changes | |
run: | | |
git config --global user.name 'Automation tool' | |
git config --global user.email '[email protected]' | |
git add lib/*.a lib/*.lib | |
git status | |
git diff-index --quiet HEAD || git commit -m "Automated build" | |
git push |