-
Notifications
You must be signed in to change notification settings - Fork 285
112 lines (103 loc) · 3.1 KB
/
ci_ubuntu.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: CI Linux
on:
push:
branches:
- "**"
paths-ignore:
- ".github/workflows/cache_*.yml"
- "docker/dev/**"
pull_request:
branches:
- "**"
paths-ignore:
- ".github/workflows/cache_*.yml"
- "docker/dev/**"
schedule:
# Cron syntax: [minute hour day_of_the_month month day_of_the_week]
- cron: "0 2 * * 0,3" # Run every Sunday and Wednesday at 02:00
workflow_dispatch:
jobs:
coverage:
if: github.event_name != 'workflow_dispatch'
name: coverage-${{ matrix.os }}-${{ matrix.build_type }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# For code coverage report to Codecov
- os: ubuntu-jammy
build_type: Debug
codecov: ON
check_format: ON
build_dartpy: ON
enable_simd: ON
env:
# Hosted on: https://hub.docker.com/repository/docker/jslee02/dart-dev
DART_DEV_IMAGE: jslee02/dart-dev
DOCKER_TAG: ${{ matrix.os }}-v6.15
PLATFORM: linux/amd64
COMPILER: gcc
BUILD_TYPE: ${{ matrix.build_type }}
BUILD_DARTPY: "${{ matrix.build_dartpy }}"
CODECOV: ${{ matrix.codecov }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CHECK_FORMAT: ${{ matrix.check_format }}
ENABLE_SIMD: ${{ matrix.enable_simd }}
DART_USE_SYSTEM_IMGUI: OFF
IN_CI: ON
IN_DOCKER: ON
steps:
# https://github.com/marketplace/actions/docker-setup-qemu
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Checkout
uses: actions/checkout@v4
- name: Pull dev container
run: docker pull $DART_DEV_IMAGE:$DOCKER_TAG
- name: Build
run: |
if [ "$CODECOV" = "ON" ]; then
ci_env=`bash <(curl -s https://codecov.io/env)`
fi
docker run \
$ci_env -e CI=true \
--platform $PLATFORM \
--volume $GITHUB_WORKSPACE:$GITHUB_WORKSPACE \
--env-file ./scripts/docker/env.list \
$DART_DEV_IMAGE:$DOCKER_TAG \
/bin/sh -c "cd $GITHUB_WORKSPACE && ./scripts/build.sh"
build:
name: ${{ matrix.build_type }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_type: ["Release", "Debug"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pixi
uses: prefix-dev/[email protected]
with:
cache: true
- uses: awalsh128/[email protected]
with:
packages: libgl1-mesa-dev libglu1-mesa-dev
version: 1.0
- name: Check Lint
run: |
DART_VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_type }} \
pixi run check-lint
- name: Test DART and dartpy
run: |
DART_VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_type }} \
pixi run test-all
- name: Install
run: |
DART_VERBOSE=ON \
BUILD_TYPE=${{ matrix.build_type }} \
pixi run install