From ca35069487257bae48252a1973b16d1a7a568509 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Tue, 26 Apr 2022 22:29:22 +0200 Subject: [PATCH] Replace remote download of irc2 with a git clone To avoid flakiness and hitting the irc.org servers too hard --- .github/workflows/test-stable.yml | 33 ++++++++++------------ workflows.yml | 46 +++++++++++++++---------------- 2 files changed, 37 insertions(+), 42 deletions(-) diff --git a/.github/workflows/test-stable.yml b/.github/workflows/test-stable.yml index 74e5d7f..85fa56c 100644 --- a/.github/workflows/test-stable.yml +++ b/.github/workflows/test-stable.yml @@ -784,36 +784,31 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.7 - - name: Get source code - run: curl http://ftp.irc.org/ftp/irc/server/irc2.11.2p3.tgz | tar -zx - - name: Configure - run: 'cd $GITHUB_WORKSPACE/irc2.11.2p3 - + - name: Checkout irc2 + uses: actions/checkout@v2 + with: + path: irc2.11.2p3 + ref: 59649f24c3a5c27bad5648b48774f27475bccfd3 + repository: irc-archive/irc2-mirror + - name: Build irc2 + run: | + # Configure + cd $GITHUB_WORKSPACE/irc2.11.2p3 ./configure --prefix=$HOME/.local/ - cd x86* - echo "#define CMDLINE_CONFIG/" >> config.h - echo "#define DEFAULT_SPLIT_USERS 0" >> config.h - echo "#define DEFAULT_SPLIT_SERVERS 0" >> config.h - #echo "#undef LIST_ALIS_NOTE" >> config.h - # TODO: find a better way to make it not fork... + echo "#define fork() (0)" >> config.h - echo "#define fork() (0)" >> config.h' - - name: Compile and install - run: 'cd $GITHUB_WORKSPACE/irc2.11.2p3/x86* - + # Compile and install + cd $GITHUB_WORKSPACE/irc2.11.2p3/x86* make -j 4 all - make install - mkdir -p $HOME/.local/bin - - cp $HOME/.local/sbin/ircd $HOME/.local/bin/ircd' + cp $HOME/.local/sbin/ircd $HOME/.local/bin/ircd - name: Install system dependencies run: sudo apt-get install atheme-services faketime - name: Install irctest dependencies diff --git a/workflows.yml b/workflows.yml index 88c29d6..b626a32 100644 --- a/workflows.yml +++ b/workflows.yml @@ -159,32 +159,32 @@ software: irc2: name: irc2 separate_build_job: false - install_steps: - stable: - - name: Get source code - run: |- - curl http://ftp.irc.org/ftp/irc/server/irc2.11.2p3.tgz | tar -zx - - name: Configure - run: |- - cd $GITHUB_WORKSPACE/irc2.11.2p3 - ./configure --prefix=$HOME/.local/ - cd x86* - echo "#define CMDLINE_CONFIG/" >> config.h - echo "#define DEFAULT_SPLIT_USERS 0" >> config.h - echo "#define DEFAULT_SPLIT_SERVERS 0" >> config.h - #echo "#undef LIST_ALIS_NOTE" >> config.h - # TODO: find a better way to make it not fork... - echo "#define fork() (0)" >> config.h - - name: Compile and install - run: |- - cd $GITHUB_WORKSPACE/irc2.11.2p3/x86* - make -j 4 all - make install - mkdir -p $HOME/.local/bin - cp $HOME/.local/sbin/ircd $HOME/.local/bin/ircd + repository : irc-archive/irc2-mirror + path: irc2.11.2p3 + cache: true + refs: + stable: 59649f24c3a5c27bad5648b48774f27475bccfd3 # irc2.11.2p3 release: null devel: null devel_release: null + build_script: | + # Configure + cd $GITHUB_WORKSPACE/irc2.11.2p3 + ./configure --prefix=$HOME/.local/ + cd x86* + echo "#define CMDLINE_CONFIG/" >> config.h + echo "#define DEFAULT_SPLIT_USERS 0" >> config.h + echo "#define DEFAULT_SPLIT_SERVERS 0" >> config.h + #echo "#undef LIST_ALIS_NOTE" >> config.h + # TODO: find a better way to make it not fork... + echo "#define fork() (0)" >> config.h + + # Compile and install + cd $GITHUB_WORKSPACE/irc2.11.2p3/x86* + make -j 4 all + make install + mkdir -p $HOME/.local/bin + cp $HOME/.local/sbin/ircd $HOME/.local/bin/ircd ircu2: name: ircu2