Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
privat committed Jun 25, 2024
1 parent 96afe78 commit f2d83ab
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 33 deletions.
40 changes: 21 additions & 19 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,25 @@ jobs:
tests-some:
runs-on: ubuntu-24.04
needs: [build]
container: "ubuntu:24.04"
services:
postgres:
image: postgres
env:
POSTGRES_HOST_AUTH_METHOD: trust
mongo:
image: mongo
neo4j:
image: 'neo4j:2.3'
env:
NEO4J_AUTH: none
strategy:
matrix:
engine: [nitcg, nitcs, nitcsg, nitce, niti]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y $BASIC_PACKAGES
run: sudo apt-get update && sudo apt-get install -y $BASIC_PACKAGES $MORE_PACKAGES
- uses: actions/download-artifact@v4
- run: chmod +x bin/*
- run: cd tests && ./search_tests_git.sh origin/master HEAD > list
Expand Down Expand Up @@ -85,6 +97,9 @@ jobs:
image: 'neo4j:2.3'
env:
NEO4J_AUTH: none
strategy:
matrix:
engine: [nitcg, nitcs, nitcsg, nitce, niti]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
Expand All @@ -93,23 +108,23 @@ jobs:
- run: chmod +x bin/*
- run: make src/version.nit
- name: Run tests
run: cd tests && make
run: cd tests && ./testfull.sh --engine ${{ matrix.engine }}
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
path: 'tests/*.xml'
name: tests-full
name: tests-full-${{ matrix.engine }}
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
path: 'tests/out'
name: tests-full-res
name: tests-full-${{ matrix.engine }}-res
- uses: EnricoMi/publish-unit-test-result-action@v2
if: success() || failure()
with:
files: "tests/*.xml"
comment_mode: off
check_name: 'tests-full Results'
check_name: tests-full (${{ matrix.engine }}) Results

nitunit-some:
runs-on: ubuntu-24.04
Expand All @@ -128,7 +143,7 @@ jobs:
NEO4J_AUTH: none
steps:
- name: Install dependencies
run: apt-get update && apt-get install -y $BASIC_PACKAGES
run: apt-get update && apt-get install -y $BASIC_PACKAGES $MORE_PACKAGES
- uses: actions/checkout@v4
- run: misc/jenkins/ensuregit.sh
- uses: actions/download-artifact@v4
Expand Down Expand Up @@ -241,7 +256,6 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: false # abort
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y $BASIC_PACKAGES
- run: make bootstrap-full
Expand Down Expand Up @@ -295,15 +309,3 @@ jobs:
- run: cat /etc/issue
- run: cat /etc/os-release
- run: env

ensuregit:
runs-on: ubuntu-24.04
container: "ubuntu:24.04"
steps:
- run: env
- run: apt-get update && apt-get install -y $BASIC_PACKAGES
- uses: actions/checkout@v4
- run: git branch -av || true
- run: misc/jenkins/ensuregit.sh
- run: git branch -av || true
- run: git log --oneline --graph --decorate origin/master..HEAD
24 changes: 10 additions & 14 deletions misc/jenkins/ensuregit.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
# This script ensura that nit is a git repository with a fetched origin
# It helps CI/CD environment that

if ! test -f src/nitc.nit; then
if [ ! -f src/nitc.nit ]; then
echo "Error: run the script in the root directory of nit"
exit 1
fi
if [ ! -d .git ]; then
echo "No git directory"
exit 1
fi

set -x
git config --global --add safe.directory /__w/nit/nit
git config --global --add safe.directory "$PWD"
if [ -d .git ]; then
git remote set-url origin https://github.com/nitlang/nit.git
git fetch origin
git branch -av
else
git init
git remote add origin https://github.com/nitlang/nit.git
git fetch origin
git reset "$GITHUB_SHA"
git branch -av
fi
git config --global --add safe.directory "$PWD" # because github action requires it
git fetch origin
git remote -v
git branch -av
git log --oneline --graph --decorate origin/master..HEAD

0 comments on commit f2d83ab

Please sign in to comment.