|
| 1 | +name: build and commit |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master, dev ] |
| 6 | + |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +jobs: |
| 10 | + |
| 11 | + build-linux-x86: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + strategy: |
| 14 | + fail-fast: false |
| 15 | + matrix: |
| 16 | + include: |
| 17 | + - platformflags: "" |
| 18 | + name: "AMD64" |
| 19 | + - platformflags: -m32 |
| 20 | + name: "i386" |
| 21 | + name: test-linux-x86 (${{matrix.name}}) |
| 22 | + env: |
| 23 | + PLATFORMFLAGS: ${{matrix.platformflags}} |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v2 |
| 26 | + - name: install multilib |
| 27 | + run: sudo apt-get install --no-install-recommends -y gcc-multilib g++-multilib |
| 28 | + if: ${{ matrix.name == 'i386' }} |
| 29 | + - name: make |
| 30 | + run: make all |
| 31 | + - name: Commit libraries |
| 32 | + run: | |
| 33 | + git config --global user.name 'Build Runner' |
| 34 | + git config --global user.email 'buildrunner@users.noreply.github.com' |
| 35 | + git add lib/*.a |
| 36 | + git commit -m "Automated build" |
| 37 | + git push |
| 38 | + |
| 39 | + build-linux-arm: |
| 40 | + if: 0 |
| 41 | + runs-on: ubuntu-latest |
| 42 | + strategy: |
| 43 | + fail-fast: false |
| 44 | + matrix: |
| 45 | + include: |
| 46 | + - arch: arm |
| 47 | + emulator: qemu-arm |
| 48 | + abi: arm-linux-gnueabi |
| 49 | + - arch: aarch64 |
| 50 | + emulator: qemu-aarch64 |
| 51 | + abi: aarch64-linux-gnu |
| 52 | + name: test-linux-arm (${{matrix.arch}}) |
| 53 | + env: |
| 54 | + PLATFORM_PREFIX: ${{matrix.abi}}- |
| 55 | + EMULATOR: ${{matrix.emulator}} |
| 56 | + steps: |
| 57 | + - uses: actions/checkout@v2 |
| 58 | + - name: install qemu |
| 59 | + run: sudo apt-get install --no-install-recommends -y qemu-user |
| 60 | + - name: install abi lib |
| 61 | + run: sudo apt-get install --no-install-recommends -y gcc-${{matrix.abi}} g++-${{matrix.abi}} |
| 62 | + - name: make |
| 63 | + run: make && make test |
| 64 | + |
| 65 | + build-windows: |
| 66 | + if: 0 |
| 67 | + runs-on: windows-2019 |
| 68 | + strategy: |
| 69 | + fail-fast: false |
| 70 | + matrix: |
| 71 | + platform: [x86, x64, ARM, ARM64] |
| 72 | + include: |
| 73 | + - platform: x86 |
| 74 | + folder: Win32 |
| 75 | + native: yes |
| 76 | + - platform: x64 |
| 77 | + folder: x64 |
| 78 | + native: yes |
| 79 | + steps: |
| 80 | + - uses: actions/checkout@v2 |
| 81 | + - name: Add msbuild to PATH |
| 82 | + uses: microsoft/setup-msbuild@v1.0.2 |
| 83 | + - name: build |
| 84 | + run: msbuild.exe vs2019\stackman.sln /p:Platform=${{matrix.platform}} |
| 85 | + - name: test |
| 86 | + if: ${{ matrix.native == 'yes' }} |
| 87 | + run: vs2019\${{matrix.folder}}\Debug\test.exe |
| 88 | + |
0 commit comments