GitHub workflows: factor more ubuntu-latest mirrors to script (#5044)
This commit is contained in:
parent
1ddb2931e4
commit
810d67cf6d
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# run as root
|
||||
|
||||
touch /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
for mirror in \
|
||||
'http://ubuntu.osuosl.org/ubuntu/' \
|
||||
'http://mirrors.ocf.berkeley.edu/ubuntu/' \
|
||||
; do
|
||||
cat /etc/apt/sources.list >> /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sed "s#http://azure.archive.ubuntu.com/ubuntu/#$mirror#" -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
done
|
||||
|
||||
apt-get -o Acquire::Retries=3 update
|
|
@ -23,12 +23,9 @@ jobs:
|
|||
java-version: '8'
|
||||
|
||||
- name: Install Tools
|
||||
working-directory: ./.github/workflows/
|
||||
run: |
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://ubuntu.osuosl.org/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
cat /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.d/ubuntu-latest-mirrors.list > /dev/null
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://mirrors.ocf.berkeley.edu/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo apt-get -o Acquire::Retries=3 update
|
||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo apt-get install mtools
|
||||
|
||||
- name: Generate Configs, Enums & Live Documentation
|
||||
|
|
|
@ -317,12 +317,9 @@ jobs:
|
|||
|
||||
- name: Install multilib, mingw, sshpass and mtools
|
||||
if: ${{ env.skip != 'true' }}
|
||||
working-directory: ./.github/workflows/
|
||||
run: |
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://ubuntu.osuosl.org/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
cat /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.d/ubuntu-latest-mirrors.list > /dev/null
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://mirrors.ocf.berkeley.edu/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo apt-get -o Acquire::Retries=3 update
|
||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo apt-get install gcc-multilib g++-multilib g++-mingw-w64 gcc-mingw-w64 sshpass mtools
|
||||
sudo apt-get install zip
|
||||
sudo apt-get install dosfstools
|
||||
|
|
|
@ -27,12 +27,9 @@ jobs:
|
|||
run: javac -version
|
||||
|
||||
- name: Install Tools
|
||||
working-directory: ./.github/workflows/
|
||||
run: |
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://ubuntu.osuosl.org/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
cat /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.d/ubuntu-latest-mirrors.list > /dev/null
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://mirrors.ocf.berkeley.edu/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo apt-get -o Acquire::Retries=3 update
|
||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo apt-get install sshpass mtools
|
||||
|
||||
- name: Generate Configs, Enums & Live Documentation
|
||||
|
|
|
@ -29,12 +29,9 @@ jobs:
|
|||
run: gcc -v
|
||||
|
||||
- name: Install multilib
|
||||
working-directory: ./.github/workflows/
|
||||
run: |
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://ubuntu.osuosl.org/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
cat /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.d/ubuntu-latest-mirrors.list > /dev/null
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://mirrors.ocf.berkeley.edu/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo apt-get -o Acquire::Retries=3 update
|
||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo apt-get install gcc-multilib g++-multilib mtools dosfstools zip
|
||||
|
||||
- name: Generate Configs, Enums & Live Documentation
|
||||
|
|
|
@ -18,12 +18,9 @@ jobs:
|
|||
run: javac -version
|
||||
|
||||
- name: Install Tools
|
||||
working-directory: ./.github/workflows/
|
||||
run: |
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://ubuntu.osuosl.org/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
cat /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.d/ubuntu-latest-mirrors.list > /dev/null
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://mirrors.ocf.berkeley.edu/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo apt-get -o Acquire::Retries=3 update
|
||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo apt-get install sshpass
|
||||
|
||||
- name: Build TS plugin body
|
||||
|
|
|
@ -27,12 +27,9 @@ jobs:
|
|||
|
||||
- name: Install required software (ubuntu)
|
||||
if: ${{ matrix.os != 'macos-latest' }}
|
||||
working-directory: ./.github/workflows/
|
||||
run: |
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://ubuntu.osuosl.org/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
cat /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.d/ubuntu-latest-mirrors.list > /dev/null
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://mirrors.ocf.berkeley.edu/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo apt-get -o Acquire::Retries=3 update
|
||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo apt-get install mtools zip dosfstools sshpass lcov valgrind
|
||||
|
||||
- name: Install required software (macos)
|
||||
|
|
|
@ -21,12 +21,9 @@ jobs:
|
|||
git submodule update --init --depth=1 firmware/controllers/can/wideband_firmware
|
||||
|
||||
- name: Install Tools
|
||||
working-directory: ./.github/workflows/
|
||||
run: |
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://ubuntu.osuosl.org/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
cat /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.d/ubuntu-latest-mirrors.list > /dev/null
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://mirrors.ocf.berkeley.edu/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo apt-get -o Acquire::Retries=3 update
|
||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo apt-get install sshpass sshpass mtools
|
||||
|
||||
- name: Generate Enum Strings
|
||||
|
|
|
@ -19,13 +19,10 @@ jobs:
|
|||
git submodule update --init --depth=1 hardware/rusefi_lib
|
||||
|
||||
- name: Install sshpass, kicad, and tk bindings
|
||||
working-directory: ./.github/workflows/
|
||||
run: |
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://ubuntu.osuosl.org/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
cat /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.d/ubuntu-latest-mirrors.list > /dev/null
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://mirrors.ocf.berkeley.edu/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo add-apt-repository --yes ppa:kicad/kicad-6.0-releases
|
||||
sudo apt-get -o Acquire::Retries=3 update
|
||||
sudo apt-get install sshpass kicad python3-pip python3-tk scour librsvg2-bin
|
||||
pip install python-dateutil pygubu
|
||||
|
||||
|
|
|
@ -12,12 +12,9 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install prerequisite software
|
||||
working-directory: ./.github/workflows/
|
||||
run: |
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://ubuntu.osuosl.org/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
cat /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.d/ubuntu-latest-mirrors.list > /dev/null
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://mirrors.ocf.berkeley.edu/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo apt-get -o Acquire::Retries=3 update
|
||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo apt-get install doxygen graphviz sshpass
|
||||
|
||||
- name: Set FTP variables
|
||||
|
|
|
@ -16,13 +16,9 @@ jobs:
|
|||
git submodule update --init --depth=1 hardware/InteractiveHtmlBom
|
||||
|
||||
- name: Install prerequisite software
|
||||
working-directory: ./.github/workflows/
|
||||
run: |
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://ubuntu.osuosl.org/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
cat /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.d/ubuntu-latest-mirrors.list > /dev/null
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://mirrors.ocf.berkeley.edu/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo add-apt-repository ppa:kicad/kicad-5.1-releases
|
||||
sudo apt-get -o Acquire::Retries=3 update
|
||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo apt-get install kicad sshpass
|
||||
|
||||
- name: Set SSH variables
|
||||
|
|
|
@ -20,12 +20,9 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Tools
|
||||
working-directory: ./.github/workflows/
|
||||
run: |
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://ubuntu.osuosl.org/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
cat /etc/apt/sources.list | sudo tee -a /etc/apt/sources.list.d/ubuntu-latest-mirrors.list > /dev/null
|
||||
sudo sed 's#http://azure.archive.ubuntu.com/ubuntu/#http://mirrors.ocf.berkeley.edu/ubuntu/#' -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
|
||||
sudo apt-get -o Acquire::Retries=3 update
|
||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
||||
sudo apt-get install subversion
|
||||
|
||||
- name: Update version header in git
|
||||
|
|
Loading…
Reference in New Issue