Skip to content

Commit

Permalink
azure: try using the nim-ci image for i386
Browse files Browse the repository at this point in the history
Multiarch doesn't work on Azure's hosted VM for some odd reasons,
(ref nim-lang#17325).
  • Loading branch information
alaviss committed Mar 17, 2021
1 parent 5fe5f47 commit ca5175d
Showing 1 changed file with 5 additions and 44 deletions.
49 changes: 5 additions & 44 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ jobs:
vmImage: 'ubuntu-16.04'
CPU: amd64
Linux_i386:
# bug #17325: fails on 'ubuntu-16.04' because it now errors with:
# g++-multilib : Depends: gcc-multilib (>= 4:5.3.1-1ubuntu1) but it is not going to be installed
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-latest'
containerImage: ghcr.io/alaviss/nim-ci:sha-6acc665@sha256:6929d3b931ec12b78dae8e8cb7bdc8431bbedb4ae699de5a887e29c21e32475d
CPU: i386
OSX_amd64:
vmImage: 'macOS-10.15'
Expand All @@ -46,6 +45,8 @@ jobs:
pool:
vmImage: $(vmImage)

container: $(containerImage)

workspace:
clean: all

Expand Down Expand Up @@ -75,46 +76,6 @@ jobs:
displayName: 'Install dependencies (amd64 Linux)'
condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'amd64'))
- bash: |
set -e
. ci/funs.sh
echo_run sudo dpkg --add-architecture i386
# Downgrade llvm:
# - llvm has to be downgraded to have 32bit version installed for sfml.
cat << EOF | sudo tee /etc/apt/preferences.d/pin-to-rel
Package: libllvm6.0
Pin: origin "azure.archive.ubuntu.com"
Pin-Priority: 1001
EOF
# echo_run sudo apt-fast update -qq
echo_run sudo apt-fast update -qq || echo "failed, see bug #17343"
# `:i386` (e.g. in `libffi-dev:i386`) is needed otherwise you may get:
# `could not load: libffi.so` during dynamic loading.
DEBIAN_FRONTEND='noninteractive' \
echo_run sudo apt-fast install --no-install-recommends --allow-downgrades -yq \
g++-multilib gcc-multilib libcurl4-openssl-dev:i386 libgc-dev:i386 \
libsdl1.2-dev:i386 libsfml-dev:i386 libglib2.0-dev:i386 libffi-dev:i386
cat << EOF > bin/gcc
#!/bin/bash
exec $(which gcc) -m32 "\$@"
EOF
cat << EOF > bin/g++
#!/bin/bash
exec $(which g++) -m32 "\$@"
EOF
echo_run chmod 755 bin/gcc
echo_run chmod 755 bin/g++
displayName: 'Install dependencies (i386 Linux)'
condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'i386'))
- bash: brew install boehmgc make sfml
displayName: 'Install dependencies (OSX)'
condition: eq(variables['Agent.OS'], 'Darwin')
Expand Down Expand Up @@ -152,7 +113,7 @@ jobs:

- task: Cache@2
inputs:
key: 'csources | "$(Agent.OS)" | $(CPU) | $(csources_version)'
key: 'csources | "$(Agent.OS)" | "$(containerImage)" | $(CPU) | $(csources_version)'
path: csources/bin
displayName: 'Restore built csources'

Expand Down

0 comments on commit ca5175d

Please sign in to comment.