summaryrefslogtreecommitdiff
path: root/.github/workflows/test-windows.yaml
blob: f3a5e8e9d8db91f1e9d3106f896d77c806dd2f6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Test Windows
on:
  schedule:
  - cron: '0 2 * * *'
  workflow_dispatch:
jobs:
  test:
    name: Test Windows
    runs-on: windows-latest
    strategy:
      fail-fast: false
      matrix:
        include:
        - erlang_version: "25"
          elixir_version: 1.14.0
    timeout-minutes: 120
    steps:
    - name: CHECKOUT REPOSITORY
      uses: actions/checkout@v3
    - name: CONFIGURE ERLANG
      uses: erlef/setup-beam@v1.13
      with:
        otp-version: ${{ matrix.erlang_version }}
        elixir-version: ${{ matrix.elixir_version }}
    #! - name: MOUNT BAZEL CACHE
    #!   uses: actions/cache@v1
    #!   with:
    #!     path: "/home/runner/repo-cache/"
    #!     key: repo-cache
    - name: CONFIGURE BAZEL
      shell: bash
      run: |
        ERL_PATH="$(which erl)"
        IEX_PATH="$(which iex)"
        sed -i"_orig" 's/build --experimental_enable_bzlmod//' .bazelrc
        cat << EOF >> user.bazelrc
          startup --output_user_root=C:/tmp
          startup --windows_enable_symlinks
          build --enable_runfiles

          build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}

          build:buildbuddy --build_metadata=ROLE=CI
          build:buildbuddy --build_metadata=VISIBILITY=PUBLIC
          build:buildbuddy --remote_instance_name=buildbuddy-io/buildbuddy/ci-windows
          # build:buildbuddy --repository_cache=/home/runner/repo-cache/
          build:buildbuddy --color=yes
          build:buildbuddy --disk_cache=
          build:buildbuddy --noexperimental_remote_cache_compression
          build:buildbuddy --noexperimental_remote_cache_async

          build --@rules_erlang//:erlang_version=${{ matrix.erlang_version }}
          build --@rules_erlang//:erlang_home="${ERL_PATH/\/bin\/erl/}"
          build --//:elixir_home="${IEX_PATH/\/bin\/iex/}"
        EOF

        bazelisk info release
    - name: RUN TESTS
      shell: cmd
      run: |
        bazelisk test //... ^
          --config=buildbuddy ^
          --test_tag_filters=-aws,-docker,-bats,-starts-background-broker ^
          --build_tests_only ^
          --verbose_failures