Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change build image to debian:oldoldstable to lower GLIBC requierment #14

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 29 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,36 @@ on:
jobs:
build:
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
runs-on: ${{ matrix.os }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
runs-on: ubuntu-latest
container: debian:oldoldstable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it not be more stable to just fix the version in place so that we manually control which debian/ubuntu version we are compiling against?

Copy link
Contributor Author

@Th3Dilli Th3Dilli Jan 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do that too, my general idea was that debian:oldoldstable is the oldest still supported version many other distos depend upon, so that way we stay on a version that is still generally used by some linux distos while not yet being too old.

Further this kinda auto updates which has pros and cons since well it auto updates so it stays updated / patched but also may break when a new version gets released and some one did not directly update their system and the newer glibc is not working anymore since OpenTK requires the newer one already

strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]

steps:
- name: Install X11 dependencies
run: |
sudo apt-get update
sudo apt-get install xorg-dev libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Download dependencies and create Nuget Package
run: ./make_nuget.ps1 "" ${{ github.run_number }}
shell: pwsh
- uses: actions/upload-artifact@v3
with:
name: NugetPackage
path: ./artifacts/*.nupkg
- name: Deploy Nuget Package
run: dotnet nuget push ./artifacts/*.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json
- name: Install X11 dependencies
run: |
apt-get update
apt-get install -y xorg-dev libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules
- name: Install build dependencies
run: |
apt-get install -y curl wget git cmake
VERSION_ID=$(awk -F= '/^VERSION_ID=/{gsub(/"/, "", $2); print $2}' /etc/os-release)
wget -q https://packages.microsoft.com/config/debian/$VERSION_ID/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
apt-get update
apt-get install -y powershell
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it suddenly necessary to install powershell manually? Does it not come with the container?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub actions are a bit weird, basically GitHub installs all one could need into the ubuntu image they provide

when using a container it runs that container next to the ubuntu image and then the commands inside the container which is just the bare bones debian docker container from https://hub.docker.com/_/debian (~50MB compressed)
so we need to install everything we need in there

https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container

- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Download dependencies and create Nuget Package
run: ./make_nuget.ps1 "" ${{ github.run_number }}
shell: pwsh
- uses: actions/upload-artifact@v3
with:
name: NugetPackage
path: ./artifacts/*.nupkg
- name: Deploy Nuget Package
run: dotnet nuget push ./artifacts/*.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json