mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
108 lines
2.9 KiB
YAML
108 lines
2.9 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
timeout-minutes: 90
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
arch: [x86_64, i686]
|
|
include:
|
|
- arch: x86_64
|
|
arch2: amd64
|
|
bit: 64
|
|
- arch: i686
|
|
arch2: i686
|
|
bit: 32
|
|
env:
|
|
MSYSTEM: MINGW${{ matrix.bit }}
|
|
MSYS2_PATH_TYPE: inherit
|
|
MSYS2_PATH_LIST: D:\msys64\mingw${{ matrix.bit }}\bin;D:\msys64\usr\local\bin;D:\msys64\usr\bin;D:\msys64\bin
|
|
MSYS2_TARBALL_URL1: https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.tar.xz
|
|
MSYS2_TARBALL_URL2: http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz
|
|
MSYS2_TARBALL_URL3: https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20190524.tar.xz
|
|
RESULT_NAME: windows-${{ matrix.arch2 }}
|
|
RESULT_PATH: windows-${{ matrix.arch2 }}
|
|
RESULT_PATH_SUB: roswell
|
|
steps:
|
|
- run: git config --global core.autocrlf false
|
|
- uses: actions/checkout@v2
|
|
- name: Install MSYS2
|
|
run: |
|
|
bash -lc @'
|
|
pwd
|
|
curl -f -L -o msys2.tar.xz $MSYS2_TARBALL_URL1 ||
|
|
curl -f -o msys2.tar.xz $MSYS2_TARBALL_URL2 ||
|
|
curl -f -L -o msys2.tar.xz $MSYS2_TARBALL_URL3
|
|
err1=$?
|
|
#tar xf msys2.tar.xz -C /d/
|
|
7z x msys2.tar.xz -so | 7z x -aoa -si -ttar -oD:
|
|
ls -l /d/
|
|
exit $err1
|
|
'@
|
|
- name: Add MSYS2 path
|
|
run: |
|
|
echo "::set-env name=PATH::$env:MSYS2_PATH_LIST;$env:PATH"
|
|
- name: Run MSYS2 once
|
|
run: |
|
|
bash -lc @'
|
|
pwd
|
|
cd $GITHUB_WORKSPACE
|
|
pwd
|
|
echo $PATH
|
|
'@
|
|
- name: Update MSYS2
|
|
run: |
|
|
bash -lc @'
|
|
pacman --version
|
|
pacman -Syyuu --noconfirm
|
|
'@
|
|
- name: Install MinGW-w64
|
|
run: |
|
|
bash -lc @'
|
|
pacman --version
|
|
pacman -S --noconfirm base-devel &&
|
|
pacman -S --noconfirm mingw${{ matrix.bit }}/mingw-w64-${{ matrix.arch }}-toolchain
|
|
'@
|
|
- name: Set environment variables
|
|
run: |
|
|
bash -lc @'
|
|
pwd
|
|
uname
|
|
uname -m
|
|
'@
|
|
- name: Build
|
|
run: |
|
|
bash -lc @'
|
|
cd $GITHUB_WORKSPACE
|
|
gcc -v
|
|
./bootstrap
|
|
./configure
|
|
make
|
|
make install
|
|
make winrelease
|
|
'@
|
|
- name: Copy Result
|
|
if: always()
|
|
run: |
|
|
bash -lc @'
|
|
cd $GITHUB_WORKSPACE
|
|
mkdir -p $RESULT_PATH
|
|
cp *.zip $RESULT_PATH/tmp.zip
|
|
cd $RESULT_PATH
|
|
7z x tmp.zip
|
|
rm tmp.zip
|
|
'@
|
|
- name: Upload Result
|
|
if: always()
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: ${{ env.RESULT_NAME }}
|
|
path: ${{ env.RESULT_PATH }}
|