Skip to content

Commit

Permalink
Deduplicate CI the hacky way
Browse files Browse the repository at this point in the history
yaml anchors are not supported by github
and every other deduplication seems to require creating a new action
as in a own repo with releases
  • Loading branch information
ChillerDragon committed Feb 20, 2024
1 parent 33640c4 commit c5810f3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 57 deletions.
59 changes: 2 additions & 57 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,7 @@ jobs:
ruby-version: 3.1.x
- name: Prepare
run: |
sudo apt-get update -y
sudo apt-get install -y tcpdump tshark
sudo apt-get install -y shellcheck teeworlds-server teeworlds teeworlds-data
sudo apt install -y build-essential glslang-tools libavcodec-extra libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfreetype6-dev libglew-dev libnotify-dev libogg-dev libopus-dev libopusfile-dev libpng-dev libsdl2-dev libsqlite3-dev libssl-dev libvulkan-dev libwavpack-dev libx264-dev
gem install bundler
gem install rubocop:1.31.2
bundle install --jobs 4 --retry 3
wget https://github.com/ChillerDragon/teeworlds/releases/download/v0.7.5-headless/teeworlds-0.7.5-linux_x86_64.tar.gz
tar -xvzf teeworlds-0.7.5-linux_x86_64.tar.gz
sudo mkdir -p /usr/local/bin/
sudo mv teeworlds-0.7.5-linux_x86_64/teeworlds /usr/local/bin/teeworlds-headless
rm -rf teeworlds-0.7.5-linux_x86_64*
wget https://github.com/ChillerDragon/ddnet/releases/download/v16.5-headless/DDNet-headless.zip
unzip DDNet-headless.zip
sudo mv DDNet-headless /usr/local/bin
rm DDNet-headless.zip
wget https://github.com/ChillerDragon/ddnet/releases/download/v17.4.2-headless-0.7/DDNet7-headless-linux.zip
unzip DDNet7-headless-linux.zip
chmod +x DDNet7-headless
sudo mv DDNet7-headless /usr/local/bin
rm DDNet7-headless-linux.zip
echo 'TODO: remove this ugly hack!'
mkdir -p ~/.teeworlds/downloadedmaps
cd ~/.teeworlds/downloadedmaps
wget https://heinrich5991.de/teeworlds/maps/maps/dm1_64548818.map
curl https://raw.githubusercontent.com/ChillerDragon/teeworlds_network/master/.github/workflows/prepare.sh | bash
- name: '[CLIENT] Test sending chat messages'
run: |
./integration_test/run.sh client/chat.rb
Expand Down Expand Up @@ -90,34 +62,7 @@ jobs:
ruby-version: 3.1.x
- name: Prepare
run: |
sudo apt-get update -y
sudo apt-get install -y teeworlds-server teeworlds teeworlds-data
sudo apt install -y build-essential glslang-tools libavcodec-extra libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfreetype6-dev libglew-dev libnotify-dev libogg-dev libopus-dev libopusfile-dev libpng-dev libsdl2-dev libsqlite3-dev libssl-dev libvulkan-dev libwavpack-dev libx264-dev
gem install bundler
gem install rubocop:1.31.2
bundle install --jobs 4 --retry 3
wget https://github.com/ChillerDragon/teeworlds/releases/download/v0.7.5-headless/teeworlds-0.7.5-linux_x86_64.tar.gz
tar -xvzf teeworlds-0.7.5-linux_x86_64.tar.gz
sudo mkdir -p /usr/local/bin/
sudo mv teeworlds-0.7.5-linux_x86_64/teeworlds /usr/local/bin/teeworlds-headless
rm -rf teeworlds-0.7.5-linux_x86_64*
wget https://github.com/ChillerDragon/ddnet/releases/download/v16.5-headless/DDNet-headless.zip
unzip DDNet-headless.zip
sudo mv DDNet-headless /usr/local/bin
rm DDNet-headless.zip
wget https://github.com/ChillerDragon/ddnet/releases/download/v17.4.2-headless-0.7/DDNet7-headless-linux.zip
unzip DDNet7-headless-linux.zip
chmod +x DDNet7-headless
sudo mv DDNet7-headless /usr/local/bin
rm DDNet7-headless-linux.zip
echo 'TODO: remove this ugly hack!'
mkdir -p ~/.teeworlds/downloadedmaps
cd ~/.teeworlds/downloadedmaps
wget https://heinrich5991.de/teeworlds/maps/maps/dm1_64548818.map
curl https://raw.githubusercontent.com/ChillerDragon/teeworlds_network/master/.github/workflows/prepare.sh | bash
- name: '[SERVER] Test chat'
run: |
./integration_test/run.sh server/chat.rb
29 changes: 29 additions & 0 deletions .github/workflows/prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
sudo apt-get update -y
sudo apt-get install -y tcpdump tshark
sudo apt-get install -y shellcheck teeworlds-server teeworlds teeworlds-data
sudo apt install -y build-essential glslang-tools libavcodec-extra libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfreetype6-dev libglew-dev libnotify-dev libogg-dev libopus-dev libopusfile-dev libpng-dev libsdl2-dev libsqlite3-dev libssl-dev libvulkan-dev libwavpack-dev libx264-dev
gem install bundler
gem install rubocop:1.31.2
bundle install --jobs 4 --retry 3

wget https://github.com/ChillerDragon/teeworlds/releases/download/v0.7.5-headless/teeworlds-0.7.5-linux_x86_64.tar.gz
tar -xvzf teeworlds-0.7.5-linux_x86_64.tar.gz
sudo mkdir -p /usr/local/bin/
sudo mv teeworlds-0.7.5-linux_x86_64/teeworlds /usr/local/bin/teeworlds-headless
rm -rf teeworlds-0.7.5-linux_x86_64*

wget https://github.com/ChillerDragon/ddnet/releases/download/v16.5-headless/DDNet-headless.zip
unzip DDNet-headless.zip
sudo mv DDNet-headless /usr/local/bin
rm DDNet-headless.zip

wget https://github.com/ChillerDragon/ddnet/releases/download/v17.4.2-headless-0.7/DDNet7-headless-linux.zip
unzip DDNet7-headless-linux.zip
chmod +x DDNet7-headless
sudo mv DDNet7-headless /usr/local/bin
rm DDNet7-headless-linux.zip

echo 'TODO: remove this ugly hack!'
mkdir -p ~/.teeworlds/downloadedmaps
cd ~/.teeworlds/downloadedmaps
wget https://heinrich5991.de/teeworlds/maps/maps/dm1_64548818.map

0 comments on commit c5810f3

Please sign in to comment.