diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build.yml | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..467a534 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,69 @@ +name: Build +on: + push: + branches: + - main + - tmp + pull_request: + branches: + - main + types: [opened, synchronize, reopened] + release: + types: [created] + schedule: + - cron: "0 13 * * 1" + +jobs: + test: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: ["ubuntu-latest", "ubuntu-20.04"] + include: + - compiler: "gcc" + os: "ubuntu-latest" + - compiler: "gcc-7" + os: "ubuntu-20.04" + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Install Ubuntu Prerequisites + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get install autoconf automake cmake libtool pkg-config gettext flex bison + sudo apt-get install ${{ matrix.compiler }} lcov + - name: Build + run: | + ./mingw-w64-build --jobs 8 --keep-artifacts --tarball ./mingw-w64-toolchain.tbz2 i686 x86_64 + - name: SHA512 + run: | + sha512sum -b ./mingw-w64-toolchain.tbz2 >./mingw-w64-toolchain.tbz2.sha512 + - name: Activate + run: | + mkdir tmp + cd tmp + tar -xjf ../mingw-w64-toolchain.tbz2 + cd .. + source ./tmp/mingw-w64-sysroot/activate.sh + x86_64-w64-mingw32-gcc -v + x86_64-w64-mingw32-g++ -v + - name: Archive Build Log + if: always() + uses: actions/upload-artifact@v2 + with: + name: build-log + path: $HOME/.mingw-w64-build-ng/build.log + - name: Upload Toolchain + if: github.event.schedule != '0 13 * * 1' + uses: actions/upload-artifact@v2 + with: + if: github.event.schedule != '0 13 * * 1' + path: | + ./mingw-w64-toolchain.tbz2 + ./mingw-w64-toolchain.tbz2.sha512 + retention-days: 7 |