From de3bb19e115178b999c65ae241634fe9671926fb Mon Sep 17 00:00:00 2001 From: Daniel Serpell Date: Wed, 24 Apr 2024 12:18:36 -0400 Subject: [PATCH] Build for Windows in CI --- .gitattributes | 2 ++ .github/workflows/c-cpp.yml | 59 +++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6885ea3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +* text=auto +testsuite/tests/* -text diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 592c5ab..f0d09ff 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -50,3 +50,62 @@ jobs: with: name: fastbasic-macos-arm64.zip path: build/fastbasic.zip + + build-windows: + name: Build and run tests on Windows + runs-on: windows-2019 + steps: + - uses: actions/checkout@v3 + with: + submodules: 'true' + - name: Setup 32-bit compiler + run: | + echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH + echo "C:\msys64\usr\bin" >> $GITHUB_PATH + echo "CC=i686-w64-mingw32-gcc" >> "$GITHUB_ENV" + shell: bash + - name: Install ZIP + run: | + export + pacman -Sy --noconfirm --noprogressbar --needed zip + shell: bash + - name: make + run: | + i686-w64-mingw32-gcc -v + make -j2 + shell: bash + - name: running testsuite + run: make test -j2 + - name: make dist + run: make dist + shell: bash + - name: Archive ZIP Windows 32-bit + uses: actions/upload-artifact@v4 + with: + name: fastbasic-windows-32bit.zip + path: build/fastbasic.zip + - name: make distclean + run: make distclean + shell: bash + - name: Setup 64-bit compiler + run: | + echo "CC=x86_64-w64-mingw32-gcc" >> "$GITHUB_ENV" + echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH + shell: bash + - name: make + run: | + x86_64-w64-mingw32-gcc -v + make -j2 + shell: bash + - name: running testsuite + run: make test -j2 + shell: bash + - name: make dist + run: make dist + shell: bash + - name: Archive ZIP Windows 64-bit + uses: actions/upload-artifact@v4 + with: + name: fastbasic-windows-64bit.zip + path: build/fastbasic.zip +