Skip to content

Add static libraries for linux_arm64 #205

Add static libraries for linux_arm64

Add static libraries for linux_arm64 #205

Workflow file for this run

name: test-build
on: [push]
jobs:
test-build:
runs-on: ubuntu-latest
env:
SDL_VERSION: 2.24.0
IMG_VERSION: 2.6.0
MIX_VERSION: 2.6.0
TTF_VERSION: 2.20.0
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.13.15'
- run: go version
- name: Cache SDL2
id: cache-sdl2
uses: actions/cache@v3
with:
path: |
SDL2-$SDL_VERSION
IMG-$IMG_VERSION
MIX-$MIX_VERSION
TTF-$TTF_VERSION
key: ${{ runner.os }}-sdl2-${{ hashFiles('**/*.h') }}
restore-keys: |
${{ runner.os }}-sdl2-
- name: Cache Go
id: cache-go
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: set PKG_CONFIG_PATH environment variable
run: |
echo "PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
- name: Download, build, and install SDL2 packages
run: |
wget https://github.com/libsdl-org/SDL/releases/download/release-$SDL_VERSION/SDL2-$SDL_VERSION.zip
unzip SDL2-$SDL_VERSION.zip
cd SDL2-$SDL_VERSION
./configure --prefix=$HOME/.local
make install
cd ..
wget https://github.com/libsdl-org/SDL_image/releases/download/release-$IMG_VERSION/SDL2_image-$IMG_VERSION.zip
unzip SDL2_image-$IMG_VERSION.zip
cd SDL2_image-$IMG_VERSION
./configure --prefix=$HOME/.local
make install
cd ..
wget https://github.com/libsdl-org/SDL_mixer/releases/download/release-$MIX_VERSION/SDL2_mixer-$MIX_VERSION.zip
unzip SDL2_mixer-$MIX_VERSION.zip
cd SDL2_mixer-$MIX_VERSION
./configure --prefix=$HOME/.local
make install
cd ..
wget https://github.com/libsdl-org/SDL_ttf/releases/download/release-$TTF_VERSION/SDL2_ttf-$TTF_VERSION.zip
unzip SDL2_ttf-$TTF_VERSION.zip
cd SDL2_ttf-$TTF_VERSION
./configure --prefix=$HOME/.local
make install
cd ..
- name: Test if Go-SDL2 works with the SDL2 packages
run: |
go build ./{sdl,img,mix,ttf}