diff --git a/.github/workflows/autoconf-check-different-distro.yml b/.github/workflows/autoconf-check-different-distro.yml deleted file mode 100644 index 76597171e4..0000000000 --- a/.github/workflows/autoconf-check-different-distro.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Check autoconf (Other distros) -on: - merge_group: - pull_request: - branches: - - main - - '[0-9]+.[0-9]+' - -jobs: - redhat-family: - strategy: - matrix: - version: [latest] - os: [fedora] - runs-on: ubuntu-latest - container: - image: ${{ matrix.os }}:${{ matrix.version }} - steps: - - name: Install git so we get the .github directory - run: dnf install -y git - - uses: actions/checkout@v4 - - name: Setup image and run bats tests - run: .github/jobs/configure-checks/setup_configure_image.sh diff --git a/.github/workflows/autoconf-check.yml b/.github/workflows/autoconf-check.yml deleted file mode 100644 index dee59a67c6..0000000000 --- a/.github/workflows/autoconf-check.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Check autoconf -on: - merge_group: - pull_request: - branches: - - main - - '[0-9]+.[0-9]+' - -jobs: - debian-family: - strategy: - matrix: - version: [jammy, focal, rolling] - os: [ubuntu] - releaseBranch: - - ${{ contains(github.ref, 'gh-readonly-queue') }} - exclude: - - releaseBranch: false - include: - - os: debian - version: stable - - os: debian - version: testing - runs-on: ubuntu-latest - env: - DEBIAN_FRONTEND: noninteractive - TZ: Etc/UTC - container: - image: ${{ matrix.os }}:${{ matrix.version }} - steps: - - name: Install git so we get the .github directory - run: apt-get update; apt-get install -y git - - uses: actions/checkout@v4 - - name: Setup image and run bats tests - run: .github/jobs/configure-checks/setup_configure_image.sh diff --git a/.github/workflows/chroot-checks.yml b/.github/workflows/chroot-checks.yml deleted file mode 100644 index f3ebd6609c..0000000000 --- a/.github/workflows/chroot-checks.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Chroot checks -on: - push: - pull_request: - branches: - - main - - '[0-9]+.[0-9]+' - -jobs: - check-chroot-arch: - runs-on: ubuntu-24.04 - container: - image: domjudge/gitlabci:24.04 - options: --privileged --cgroupns=host --init - strategy: - matrix: - arch: [amd64, default] - steps: - - name: Checkout current code - uses: actions/checkout@v4 - - name: Install DOMjudge - run: | - .github/jobs/chroot_checks.sh ${{ matrix.arch }} - - name: Upload all logs/artifacts - if: ${{ !cancelled() }} - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.arch }}-logs - path: | - /tmp/artifacts diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 77a7a5852c..0000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: "CodeQL" - -on: - merge_group: - pull_request: - branches: - - main - - '[0-9]+.[0-9]+' - -jobs: - analyze: - container: - image: domjudge/gitlabci:24.04 - options: --user domjudge - name: Analyze - runs-on: ubuntu-latest - env: - COMPILED: "cpp" - USER: "domjudge" - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'cpp', 'java', 'javascript', 'python' ] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - - - name: Install composer files - if: ${{ contains(env.COMPILED, matrix.language) }} - run: | - cd webapp - composer install --no-scripts - - - name: Configure Makefile - if: ${{ contains(env.COMPILED, matrix.language) }} - run: | - DIR=$(pwd) - mkdir ./installdir - make configure - ./configure --enable-doc-build=no --prefix=$DIR/installdir - - - name: Compile domserver - if: ${{ contains(env.COMPILED, matrix.language) }} - run: | - make domserver - make install-domserver - - - name: Compile the build scripts for languages - run: | - make build-scripts - - - name: Compile judgehost - if: ${{ contains(env.COMPILED, matrix.language) }} - run: | - make judgehost - sudo make install-judgehost - - - name: Remove upstream code - run: | - rm -rf webapp/public/js/monaco doc/manual/_static - - - name: Chown everything to the current runner user - if: ${{ contains(env.COMPILED, matrix.language) }} - run: sudo chown -R ${USER} ./installdir - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index 4e88d00c28..0000000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,24 +0,0 @@ -on: - merge_group: - pull_request: - branches: - - main - - '[0-9]+.[0-9]+' - -name: Spell Check - -jobs: - codespell: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Rewrite Changelog to find new mistakes - run: awk '1;/Version 7.2.1 - 6 May 2020/{exit}' ChangeLog > latest_Changelog - - name: Get dirs to skip - id: list_to_csv - run: echo "::set-output name=SKIP::$(awk '{print $1}' .github/jobs/data/codespellignorefiles.txt | paste -s -d, -)" - - uses: codespell-project/actions-codespell@master - with: - check_filenames: true - ignore_words_file: .github/jobs/data/codespellignorewords.txt - skip: ${{ steps.list_to_csv.outputs.SKIP }} diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml deleted file mode 100644 index 0dbddf8f72..0000000000 --- a/.github/workflows/codestyle.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: Codestandard -on: - merge_group: - pull_request: - branches: - - main - - '[0-9]+.[0-9]+' - -jobs: - syntax-job: - runs-on: ubuntu-latest - container: - image: domjudge/gitlabci:24.04 - steps: - - uses: actions/checkout@v4 - - name: Run the syntax checks - run: .github/jobs/syntax.sh - - detect-dump: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: "Search for leftover dump( statements" - run: .github/jobs/detect_dump.sh - - php-linter: - runs-on: ubuntu-latest - container: - image: pipelinecomponents/php-linter:latest - steps: - - uses: actions/checkout@v4 - - name: Detect PHP linting issues - run: > - parallel-lint --colors - lib/lib.*.php - etc - judge - webapp/src - webapp/tests - webapp/public - webapp/config - - phpcs_compatibility: - runs-on: ubuntu-latest - container: - image: pipelinecomponents/php-codesniffer:latest - strategy: - matrix: - PHPVERSION: ["8.1", "8.2", "8.3", "8.4"] - steps: - - run: apk add git - - uses: actions/checkout@v4 - - name: Various fixes to this image - run: .github/jobs/fix_pipelinecomponents_image.sh - - name: Detect compatibility with supported PHP version - run: > - phpcs -s -p --colors - --standard=PHPCompatibility - --extensions=php - --runtime-set testVersion ${{ matrix.PHPVERSION }} - lib/lib.*.php - etc - judge - webapp/src - webapp/tests - webapp/public - webapp/config - - pycodestyle: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Download pycodestyle python file - run: > - curl -L -o /tmp/pycodestyle.py 'https://github.com/PyCQA/pycodestyle/raw/refs/tags/2.12.1/pycodestyle.py' - - name: Check codestyle in python files - run: > - python3 /tmp/pycodestyle.py \ - --exclude='./example_problems/,./doc/,./gitlab/,./webapp/vendor/' \ - --max-line-length 120 \ - --show-pep8 --show-source \ - . - - pyright: - runs-on: ubuntu-latest - steps: - - uses: jakebailey/pyright-action@v2 - with: - version: 1.1.311 diff --git a/.github/workflows/database-upgrade.yml b/.github/workflows/database-upgrade.yml deleted file mode 100644 index dd3fe7a351..0000000000 --- a/.github/workflows/database-upgrade.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Database Upgrade Test - -on: - merge_group: - pull_request: - branches: - - main - - '[0-9]+.[0-9]+' - -jobs: - upgrade_test: - runs-on: ubuntu-latest - container: - image: domjudge/gitlabci:24.04 - services: - sqlserver: - image: mariadb - ports: - - 3306:3306 - env: - MYSQL_ROOT_PASSWORD: root - MYSQL_USER: domjudge - MYSQL_PASSWORD: domjudge - options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3 - steps: - - uses: actions/checkout@v4 - - name: Import Database - run: mysql -hsqlserver -uroot -proot < .github/jobs/data/dj733.sql - - name: Upgrade DOMjudge - run: .github/jobs/baseinstall.sh default upgrade - - name: Setting initial Admin Password - run: echo "pass" > /opt/domjudge/domserver/etc/initial_admin_password.secret - - name: Check for Errors in the Upgrade - run: mysql -hsqlserver -uroot -proot -e "SHOW TABLES FROM domjudge;" - - name: Check for Errors in Domjudge Web - run: .github/jobs/webstandard.sh none admin diff --git a/.github/workflows/phpcodesniffer.yml b/.github/workflows/phpcodesniffer.yml deleted file mode 100644 index 249b86ce63..0000000000 --- a/.github/workflows/phpcodesniffer.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: PHP CodeSniffer - -# Controls when the action will run. -on: - merge_group: - pull_request: - branches: - - main - - '[0-9]+.[0-9]+' -jobs: - phpcs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # important! - - name: Install PHP_CodeSniffer - run: | - curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar - php phpcs.phar --version - - - uses: domjudge/action-php-codesniffer@master - with: - files: "**.php" # you may customize glob as needed - scope: files - phpcs_path: php phpcs.phar - standard: .github/jobs/data/phpruleset.xml - fail_on_errors: false - fail_on_warnings: false diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml deleted file mode 100644 index 3d7b4fd952..0000000000 --- a/.github/workflows/phpstan.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Run PHPStan -on: - merge_group: - pull_request: - branches: - - main - - '[0-9]+.[0-9]+' - -jobs: - phpstan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Setup composer dependencies - run: .github/jobs/composer_setup.sh - - name: Show the phpstan version - run: webapp/vendor/phpstan/phpstan/phpstan --version - - uses: php-actions/phpstan@v3.0.2 - with: - configuration: webapp/phpstan.dist.neon - path: webapp/src webapp/tests - php_extensions: gd intl mysqli pcntl zip - autoload_file: webapp/vendor/autoload.php - version: composer - - uses: actions/upload-artifact@v4 - if: always() - with: - path: /tmp/artifacts diff --git a/.github/workflows/runpipe.yml b/.github/workflows/runpipe.yml deleted file mode 100644 index b096a28141..0000000000 --- a/.github/workflows/runpipe.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Run runpipe and runguard tests -on: - merge_group: - pull_request: - branches: - - main - - '[0-9]+.[0-9]+' - -jobs: - runpipe: - runs-on: ubuntu-24.04 - timeout-minutes: 20 - container: - image: domjudge/gitlabci:24.04 - options: --privileged --cgroupns=host --init - steps: - - uses: actions/checkout@v4 - - name: info - run: cat /proc/cmdline && echo && cat /proc/mounts && echo && ls -al /sys/fs/cgroup && echo && uname -a && echo && stat -fc %T /sys/fs/cgroup && echo && cat /proc/self/cgroup - - name: Create the configure file - run: make configure - - name: Do the default configure - run: ./configure --with-baseurl='http://localhost/domjudge/' --with-domjudge-user=domjudge --with-judgehost_chrootdir=${DIR}/chroot/domjudge - - name: Prepare judgehost files - run: make judgehost - - name: Run the actual runpipe tests - working-directory: judge/runpipe_test - run: make test - - name: Add user/group - run: sudo addgroup domjudge-run-0 && sudo usermod -g domjudge-run-0 domjudge-run-0 - - name: Create dir - run: mkdir -p /opt/domjudge/judgehost/tmp/ - - name: Run the actual runguard tests - working-directory: judge/runguard_test - env: - judgehost_tmpdir: /tmp - judgehost_judgedir: /tmp - run: make test - diff --git a/.github/workflows/shiftleft.yml b/.github/workflows/shiftleft.yml deleted file mode 100644 index 3f89782341..0000000000 --- a/.github/workflows/shiftleft.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: SL Scan - -on: - merge_group: - -jobs: - Scan-Build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Perform Scan - uses: ShiftLeftSecurity/scan-action@master - env: - WORKSPACE: "" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SCAN_AUTO_BUILD: true - SCAN_ANNOTATE_PR: 0 - with: - output: reports - type: python,bash - - - name: Upload report - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: reports