fix(ci): make it work again (#52) #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: goreleaser | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
macos-sdk: | |
runs-on: macos-latest | |
steps: | |
- id: osxcross-macos-sdk | |
uses: actions/cache@v4 | |
with: | |
path: osxcross/tarballs | |
key: ${{ runner.os }}-osxcross-macos-sdk | |
- name: Package MacOSX SDK | |
if: steps.osxcross-macos-sdk.outputs.cache-hit != 'true' | |
run: | | |
git clone https://github.com/tpoechtrager/osxcross osxcross | |
pushd osxcross | |
XCODEDIR=/Applications/Xcode_16.0.app tools/gen_sdk_package.sh | |
mv MacOSX*.sdk.tar.xz tarballs/ | |
popd | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: osxcross-tarballs | |
path: osxcross/tarballs | |
goreleaser: | |
runs-on: ubuntu-latest | |
container: fedora:41 | |
needs: macos-sdk | |
steps: | |
- name: Install dependencies | |
run: | | |
dnf -y install autoconf bash clang cmake gettext-devel git glibc-{devel,static}.{i686,x86_64} golang libstdc++-static libtool libuuid-devel libxml2-devel llvm-devel make mingw{32,64}-{winpthreads,xz-libs}-static mingw{32,64}-gcc{-c++,} openssl-devel patch po4a xz-{devel,static}.{i686,x86_64} | |
dnf -y install 'dnf-command(download)' | |
dnf download --source xz-devel | |
rpm -ivh *.src.rpm | |
rm -f *.src.rpm | |
- name: Setup cross compile environment for Linux ARMv7 | |
env: | |
CC: arm-linux-gnueabi-gcc | |
CXX: arm-linux-gnueabi-c++ | |
CFLAGS: -fPIC | |
run: | | |
dnf -y copr enable lantw44/arm-linux-gnueabi-toolchain | |
dnf -y install arm-linux-gnueabi-{binutils,gcc,glibc} | |
mkdir /linux-armv7-buildroot | |
pushd /linux-armv7-buildroot | |
tar -xvf $HOME/rpmbuild/SOURCES/xz-*.tar.gz | |
pushd $(basename $HOME/rpmbuild/SOURCES/xz-*.tar.gz .tar.gz) | |
./autogen.sh | |
./configure --host=armv7 --prefix=/linux-armv7-buildroot/sys-root | |
make -j$(nproc) install | |
popd | |
popd | |
- name: Setup cross compile environment for Linux AArch64 | |
env: | |
CC: aarch64-linux-gnu-gcc | |
CXX: aarch64-linux-gnu-c++ | |
run: | | |
dnf -y copr enable lantw44/aarch64-linux-gnu-toolchain | |
dnf -y install aarch64-linux-gnu-{binutils,gcc,glibc} | |
mkdir /linux-aarch64-buildroot | |
pushd /linux-aarch64-buildroot | |
tar -xvf $HOME/rpmbuild/SOURCES/xz-*.tar.gz | |
pushd $(basename $HOME/rpmbuild/SOURCES/xz-*.tar.gz .tar.gz) | |
./autogen.sh | |
./configure --host=aarch64 --prefix=/linux-aarch64-buildroot/sys-root | |
make -j$(nproc) install | |
popd | |
popd | |
- name: Download osxcross | |
run: git clone https://github.com/tpoechtrager/osxcross /osxcross | |
- id: osxcross-target | |
uses: actions/cache@v4 | |
with: | |
path: /osxcross/target | |
key: ${{ runner.os }}-osxcross-target | |
- uses: actions/download-artifact@v4 | |
if: steps.osxcross-target.outputs.cache-hit != 'true' | |
with: | |
name: osxcross-tarballs | |
path: /osxcross/tarballs | |
- uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: osxcross-tarballs | |
- name: Build osxcross | |
if: steps.osxcross-target.outputs.cache-hit != 'true' | |
run: UNATTENDED=1 SDK_VERSION=15.0 ./build.sh | |
working-directory: /osxcross | |
- name: Setup cross compile environment for Darwin AMD64 | |
env: | |
CC: o64-clang | |
CXX: o64-clang++ | |
run: | | |
mkdir /darwin-amd64-buildroot | |
pushd /darwin-amd64-buildroot | |
tar -xvf $HOME/rpmbuild/SOURCES/xz-*.tar.gz | |
pushd $(basename $HOME/rpmbuild/SOURCES/xz-*.tar.gz .tar.gz) | |
PATH=/osxcross/target/bin:$PATH ./autogen.sh | |
PATH=/osxcross/target/bin:$PATH ./configure --host=x86_64-apple-darwin24 --prefix=/darwin-amd64-buildroot/sys-root --enable-shared=no | |
PATH=/osxcross/target/bin:$PATH make -j$(nproc) install | |
popd | |
popd | |
- name: Setup cross compile environment for Darwin AArch64 | |
env: | |
CC: oa64-clang | |
CXX: oa64-clang++ | |
run: | | |
mkdir /darwin-aarch64-buildroot | |
pushd /darwin-aarch64-buildroot | |
tar -xvf $HOME/rpmbuild/SOURCES/xz-*.tar.gz | |
pushd $(basename $HOME/rpmbuild/SOURCES/xz-*.tar.gz .tar.gz) | |
PATH=/osxcross/target/bin:$PATH ./autogen.sh | |
PATH=/osxcross/target/bin:$PATH ./configure --host=aarch64-apple-darwin24 --prefix=/darwin-aarch64-buildroot/sys-root --enable-shared=no | |
PATH=/osxcross/target/bin:$PATH make -j$(nproc) install | |
popd | |
popd | |
- uses: actions/checkout@v4 | |
- name: Add $GITHUB_WORKSPACE to git safe.directory | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |