-
Notifications
You must be signed in to change notification settings - Fork 2.6k
67 lines (57 loc) · 2.01 KB
/
standard_library_tests_and_examples.yml
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
66
67
# ===----------------------------------------------------------------------=== #
# Copyright (c) 2024, Modular Inc. All rights reserved.
#
# Licensed under the Apache License v2.0 with LLVM Exceptions:
# https://llvm.org/LICENSE.txt
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ===----------------------------------------------------------------------=== #
name: Test stdlib and examples
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
test-examples:
name: with ${{ matrix.os }} and assertions=${{ matrix.mojo-enable-assertions }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-14"]
mojo-enable-assertions: [0, 1]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Download Magic CLI
run: |
curl -ssL https://magic.modular.com/cfba4c92-2390-4b86-93de-04b2f47114d5 | bash
# Add magic to PATH
echo "$HOME/.modular/bin" >> $GITHUB_PATH
- name: Install build tools (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
./stdlib/scripts/install-build-tools-linux.sh
- name: Install build tools (macOS)
if: ${{ matrix.os == 'macos-14' }}
run: |
./stdlib/scripts/install-build-tools-macos.sh
- name: Run standard library tests and examples
env:
MOJO_ENABLE_ASSERTIONS_IN_TESTS: ${{ matrix.mojo-enable-assertions }}
run: |
magic run --frozen tests
magic run --frozen examples