Skip to content

Commit

Permalink
ci: WIP: add a windows-latest build
Browse files Browse the repository at this point in the history
  • Loading branch information
puffnfresh committed Nov 6, 2024
1 parent b4d52cd commit f493fe7
Showing 1 changed file with 60 additions and 5 deletions.
65 changes: 60 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v30
- if: matrix.os != 'windows-latest'
uses: cachix/install-nix-action@v30
with:
# The sandbox would otherwise be disabled by default on Darwin
extra_nix_config: "sandbox = true"
- run: echo CACHIX_NAME="$(echo $GITHUB_REPOSITORY-install-tests | tr "[A-Z]/" "[a-z]-")" >> $GITHUB_ENV
- if: matrix.os != 'windows-latest'
run: echo CACHIX_NAME="$(echo $GITHUB_REPOSITORY-install-tests | tr "[A-Z]/" "[a-z]-")" >> $GITHUB_ENV
- uses: cachix/cachix-action@v15
if: needs.check_secrets.outputs.cachix == 'true'
with:
Expand All @@ -48,8 +50,61 @@ jobs:
free -h
done
) &
- run: nix --experimental-features 'nix-command flakes' flake check -L
- run: nix --experimental-features 'nix-command flakes' flake show --all-systems --json
- if: matrix.os != 'windows-latest'
run: nix --experimental-features 'nix-command flakes' flake check -L
- if: matrix.os != 'windows-latest'
run: nix --experimental-features 'nix-command flakes' flake show --all-systems --json

# We don't have a fully working nix.exe yet, but we'd like to run functional tests
# For now, we can build using mingw64 and run the tests.
- if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
install: >-
autoconf-archive
autoconf-wrapper
automake-wrapper
bison
flex
git
make
patch
mingw-w64-x86_64-boost
mingw-w64-x86_64-brotli
mingw-w64-x86_64-cmake
mingw-w64-x86_64-curl
mingw-w64-x86_64-gc
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gtest
mingw-w64-x86_64-jq
mingw-w64-x86_64-libarchive
mingw-w64-x86_64-libsodium
mingw-w64-x86_64-meson
mingw-w64-x86_64-nlohmann-json
mingw-w64-x86_64-openssl
mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-readline
mingw-w64-x86_64-sqlite3
- if: matrix.os == 'windows-latest'
shell: msys2 {0}
run: |
pushd /tmp
git clone -b nix-dependencies https://github.com/nix-windows/MINGW-packages.git
pushd MINGW-packages
pushd mingw-w64-toml11
makepkg-mingw -sCLfi --noconfirm --nocheck
popd
pushd mingw-w64-libgit2
makepkg-mingw -sCLfi --noconfirm --nocheck
popd
popd
popd
meson setup build -Dlibutil:cpuid=disabled -Dlibcmd:readline-flavor=readline -Ddoc-gen=false -Dunit-tests=false -Dbindings=false
cd build
meson test
# Steps to test CI automation in your own fork.
# Cachix:
Expand Down

0 comments on commit f493fe7

Please sign in to comment.