Skip to content

Commit

Permalink
Split github workflow into separate jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
yousseb committed Oct 22, 2023
1 parent 0603ff8 commit f49da78
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-environment:
name: Build Docker Images
name: Build Environment
runs-on: macos-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down Expand Up @@ -48,3 +48,12 @@ jobs:
with:
name: Environment
path: /Users/runner/gtk

build-app:
name: Build Application
runs-on: build-environment
needs: deploy-code
steps:
- name: FIX gir
run: |
cd osx && /bin/bash ./fix_gir.sh
33 changes: 17 additions & 16 deletions osx/build_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jhbuild buildone gtksourceview3 gtk-mac-integration gtk-mac-integration-python
# (cd $HOME/gtk/inst/share/themes && ln -sf Mojave-dark-solid-alt Meld-Mojave-dark)
# (cd $HOME/gtk/inst/share/themes && ln -sf Mojave-light-solid-alt Meld-Mojave-light)

# pushd .
pushd .
# cd $HOME/Source
# GTKSRCVIEW=gtksourceview-4.8.4
# curl -OL https://download.gnome.org/sources/gtksourceview/4.8/gtksourceview-4.8.4.tar.xz
Expand All @@ -87,21 +87,22 @@ popd
# gir files without the prefix/full path to the library.
# We want the prefixes. We'll edit them manually later in build_app to point
# to the ones we include.
WORKDIR=$(mktemp -d)
for i in $(find $HOME/gtk/inst/share/gir-1.0 -name *.gir); do
if [ `grep shared-library=\"lib* ${i}` ]; then
gir=$(echo $(basename $i))

typelib=${gir%.*}.typelib
echo Processing $gir to ${WORKDIR}/$typelib

cat $i | sed s_"shared-library=\""_"shared-library=\"$HOME/gtk/inst/lib/"_g > ${WORKDIR}/$gir
cp ${WORKDIR}/$gir $HOME/gtk/inst/share/gir-1.0
$HOME/gtk/inst/bin/g-ir-compiler ${WORKDIR}/$gir -o ${WORKDIR}/$typelib
fi
done
cp ${WORKDIR}/*.typelib $HOME/gtk/inst/lib/girepository-1.0
rm -fr ${WORKDIR}
# Moving to fix-gir script..
# WORKDIR=$(mktemp -d)
# for i in $(find $HOME/gtk/inst/share/gir-1.0 -name *.gir); do
# if [ `grep shared-library=\"lib* ${i}` ]; then
# gir=$(echo $(basename $i))

# typelib=${gir%.*}.typelib
# echo Processing $gir to ${WORKDIR}/$typelib

# cat $i | sed s_"shared-library=\""_"shared-library=\"$HOME/gtk/inst/lib/"_g > ${WORKDIR}/$gir
# cp ${WORKDIR}/$gir $HOME/gtk/inst/share/gir-1.0
# $HOME/gtk/inst/bin/g-ir-compiler ${WORKDIR}/$gir -o ${WORKDIR}/$typelib
# fi
# done
# cp ${WORKDIR}/*.typelib $HOME/gtk/inst/lib/girepository-1.0
# rm -fr ${WORKDIR}


exit
Expand Down

0 comments on commit f49da78

Please sign in to comment.