Skip to content

Commit

Permalink
Build inside container
Browse files Browse the repository at this point in the history
Mostly do it in order to be able to upload the entire /usr/local which
is empty inside the minimal container but contains plenty of other stuff
in the default GitHub Actions environment -- this is much simpler than
uploading just the files installed by "make install" or installing them
in some other directory.

Also separate 32- and 64-bit builds.
  • Loading branch information
vadz committed Sep 27, 2022
1 parent aceac5d commit c17b158
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/build_msw_xml_libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,38 @@ jobs:
build-xml-libs:
name: Build XML binaries
runs-on: ubuntu-latest
container: debian:stable-slim

strategy:
fail-fast: false
matrix:
include:
- name: 32 Bits
host: i686-w64-mingw32
- name: 64 Bits
host: x86_64-w64-mingw32

env:
HOST: ${{ matrix.host }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Compiler
run: |
sudo apt-get update -qq
sudo apt-get install -qq --no-install-recommends g++-mingw-w64-i686 g++-mingw-w64-x86-64
- name: Build 32-bit Libraries
- name: Install Tools
run: |
HOST=i686-w64-mingw32 ./scripts/install_deps.sh
apt-get update -qq
arch=`echo $HOST | sed -e 's/-w64-mingw32$//;s/_/-/'`
apt-get install -qq --no-install-recommends g++-mingw-w64-$arch make pkg-config wget
- name: Build 64-bit Libraries
- name: Build
run: |
HOST=x86_64-w64-mingw32 ./scripts/install_deps.sh
# sudo doesn't work and is not necessary inside a container, so don't use it.
SUDO=env ./scripts/install_deps.sh
- name: Upload
uses: actions/upload-artifact@v3
with:
name: xml-libs
name: xmllibs-${{ matrix.host }}
path: /usr/local
if-no-files-found: error
2 changes: 1 addition & 1 deletion scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ install_lib() {
cd build-${HOST-native}
../configure $configure_args "$@"
make --no-print-directory -j`nproc`
sudo make --no-print-directory install
${SUDO-sudo} make --no-print-directory install
cd ../..
}

Expand Down

0 comments on commit c17b158

Please sign in to comment.