Skip to content

Commit 1075f19

Browse files
committed
Add CI
1 parent 938cb73 commit 1075f19

File tree

3 files changed

+75
-1
lines changed

3 files changed

+75
-1
lines changed

.ci/nox/install.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
# ENFORCE SOURCING
4+
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
5+
echo "Usage: source setup_mamba.sh"
6+
exit 1
7+
fi
8+
9+
INSTALL_DIR="$(pwd)/bin"
10+
export MAMBA_ROOT_PREFIX="$(pwd)/micromamba"
11+
export MAMBA_EXE="$INSTALL_DIR/micromamba"
12+
13+
# DOWNLOAD IF MISSING
14+
if [ ! -f "$MAMBA_EXE" ]; then
15+
echo "Downloading micromamba to $INSTALL_DIR..."
16+
mkdir -p "$INSTALL_DIR"
17+
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj -C "$(pwd)" bin/micromamba
18+
fi
19+
20+
export PATH="$INSTALL_DIR:$PATH"
21+
eval "$($MAMBA_EXE shell hook --shell bash --root-prefix $MAMBA_ROOT_PREFIX)"

.github/bazel_version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[
22
"6.5.0",
3-
"7.7.0"
3+
"7.7.1"
44
]
55

.github/workflows/nox.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright 2023 Ericsson AB
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: codechecker-bazel-nox-tests
16+
17+
# Triggers the workflow on push or pull request events.
18+
on: [push, pull_request]
19+
20+
permissions: read-all
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
26+
jobs:
27+
micromamba-test:
28+
name: "Nox tests (Ubuntu)"
29+
runs-on: ubuntu-24.04
30+
strategy:
31+
fail-fast: false
32+
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
36+
37+
- name: Install dependencies
38+
run: |
39+
pip install nox pytest
40+
41+
# Bazel 7 provided by micromamba is compiled using a newer java version
42+
# than the default in Github runner
43+
- name: Set up JRE 21
44+
uses: actions/setup-java@v4
45+
with:
46+
java-version: '21'
47+
distribution: 'temurin'
48+
java-package: 'jre'
49+
50+
- name: Install micromamba and run tests
51+
run: |
52+
source .ci/nox/install.sh
53+
nox

0 commit comments

Comments
 (0)