From: Matthew Newton Date: Thu, 23 Mar 2023 14:34:30 +0000 (+0000) Subject: CI: remove non-Docker path X-Git-Tag: release_3_2_3~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae0a9adb054d6fcfcccf45fb231f0a1f1dca8b69;p=thirdparty%2Ffreeradius-server.git CI: remove non-Docker path --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b157a15c41..ec4528799a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,20 +18,8 @@ env: REST_TEST_SERVER: 127.0.0.1 REST_TEST_SERVER_PORT: 8080 REST_TEST_SERVER_SSL_PORT: 8443 -# -# Update between running in a container (GitHub runner and -# self-hosted runner), or directly on the VM (currently GitHub -# runner only, as our runners don't get root access). Remember to -# comment/uncomment other sections below as well. -# -# Container: - USE_DOCKER: 1 SQL_MYSQL_TEST_SERVER: mariadb SQL_POSTGRESQL_TEST_SERVER: postgres -# Hosted: -# USE_DOCKER: 0 -# SQL_MYSQL_TEST_SERVER: 127.0.0.1 -# SQL_POSTGRESQL_TEST_SERVER: 127.0.0.1 jobs: pre-ci: @@ -49,7 +37,6 @@ jobs: runs-on: ${{ matrix.os.runs_on }} -# Comment out when not using containers: container: image: ${{ matrix.os.docker }} @@ -64,13 +51,10 @@ jobs: # docker - the docker image name, if containers are being used # name - used in the job name only # -# Self-hosted runner (must set USE_DOCKER=1 above): - runs_on: "${{ needs.pre-ci.outputs.selfhosted == '1' && 'self-hosted' || 'ubuntu-20.04' }}" docker: "${{ needs.pre-ci.outputs.selfhosted == '1' && 'docker.internal.networkradius.com/self-hosted' || 'ubuntu:20.04' }}" name: "${{ needs.pre-ci.outputs.selfhosted == '1' && 'self' || 'gh' }}-ubuntu20" code: "ubuntu2004" -# GitHub runner (may set USE_DOCKER=0 or 1 above): -# - { runs_on: "ubuntu-20.04", code: "ubuntu2004", docker: "ubuntu:20.04", name: "gh20-ubuntu20" } env: - { CC: gcc, DO_BUILD: yes, LIBS_OPTIONAL: no, LIBS_ALT: no, REPRODUCIBLE: no, SANITIZER: no, BUILD_CFLAGS: "-DWITH_EVAL_DEBUG", NAME: linux-gcc-lean } @@ -94,9 +78,6 @@ jobs: # The standard GitHub environment contains PostgreSQL and # MySQL already. However when running on hosted GitHub runners # we need to run separate database containers to provide these. -# -# Comment out the "services" section when USE_DOCKER=0 -# services: mariadb: image: mariadb @@ -117,7 +98,6 @@ jobs: steps: - name: Self-hosted runner container fixes - if: ${{ env.USE_DOCKER == 1 }} run: | ln -fs /usr/bin/env /usr/local/bin/sudo rm -rf "$HOME"/* @@ -330,7 +310,6 @@ jobs: sudo apt-get update - name: Setup git (containers) - if: ${{ env.USE_DOCKER == 1 }} shell: bash run: git config --global --add safe.directory "$GITHUB_WORKSPACE" @@ -351,22 +330,7 @@ jobs: sudo mv -f /usr/bin/ucf.disabled /usr/bin/ucf - - name: Database dependencies (GitHub runner) - if: ${{ env.USE_DOCKER != 1 }} - run: | - export PG_VER=$(cd /etc/postgresql ; ls | head ) - sudo sh -c "echo host all all 127.0.0.1/32 trust > /etc/postgresql/$PG_VER/main/pg_hba.conf" - sudo sh -c "echo local all all trust >> /etc/postgresql/$PG_VER/main/pg_hba.conf" - - sudo systemctl stop slapd - sudo aa-complain /usr/sbin/slapd - - sudo systemctl start mysql postgresql - - sudo mysql -h 127.0.0.1 -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '';" - - - name: Database dependencies (containers) - if: ${{ env.USE_DOCKER == 1 }} + - name: Database dependencies run: | sudo apt-get install ${APT_OPTS} \ mariadb-client \ @@ -393,8 +357,7 @@ jobs: $script done - - name: Configure test database access (containers) - if: ${{ env.USE_DOCKER == 1 }} + - name: Configure test database access run: | mysql -h mariadb -uroot -e "CREATE USER 'radius'@'%' IDENTIFIED BY 'radpass';" mysql -u root -h mariadb -e "GRANT ALL ON radius.* TO 'radius'; FLUSH PRIVILEGES;"