mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-22 23:00:58 +00:00
103 lines
2.6 KiB
YAML
103 lines
2.6 KiB
YAML
name: i386 Linux CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'devel'
|
|
pull_request:
|
|
branches:
|
|
- 'devel'
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 20
|
|
matrix:
|
|
branch: [devel]
|
|
target:
|
|
- os: linux
|
|
cpu: i386
|
|
nim_branch: devel
|
|
include:
|
|
- target:
|
|
os: linux
|
|
builder: ubuntu-24.04
|
|
|
|
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }}-nim-${{ matrix.target.nim_branch }} (${{ matrix.branch }})'
|
|
runs-on: ${{ matrix.builder }}
|
|
env:
|
|
NIM_DIR: nim-${{ matrix.target.nim_branch }}-${{ matrix.target.cpu }}
|
|
NIM_BRANCH: ${{ matrix.target.nim_branch }}
|
|
NIM_ARCH: ${{ matrix.target.cpu }}
|
|
steps:
|
|
- name: set `core.autocrlf` to false
|
|
run: |
|
|
git config --global core.autocrlf false
|
|
git config --global init.defaultBranch master
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
submodules: false
|
|
|
|
- name: Install dependencies (Linux i386)
|
|
if: runner.os == 'Linux' && matrix.target.cpu == 'i386'
|
|
working-directory: ${{ github.workspace }}
|
|
run: |
|
|
sudo dpkg --add-architecture i386
|
|
sudo apt-get update -qq
|
|
sudo DEBIAN_FRONTEND='noninteractive' apt-get install \
|
|
--no-install-recommends -yq gcc-multilib g++-multilib \
|
|
libssl-dev:i386
|
|
|
|
mkdir -p external/bin
|
|
cat << EOF > external/bin/gcc
|
|
#!/bin/bash
|
|
|
|
exec $(which gcc) -m32 "\$@"
|
|
EOF
|
|
|
|
cat << EOF > external/bin/g++
|
|
#!/bin/bash
|
|
|
|
exec $(which g++) -m32 "\$@"
|
|
EOF
|
|
|
|
chmod 755 external/bin/gcc external/bin/g++
|
|
|
|
echo "$PWD/external/bin" >> "${GITHUB_PATH}"
|
|
|
|
- name: Add repo bin to PATH
|
|
run: echo "${GITHUB_WORKSPACE}/bin" >> ${GITHUB_PATH}
|
|
|
|
- name: Setup Nim
|
|
uses: alaviss/setup-nim@0.1.1
|
|
with:
|
|
path: 'nim'
|
|
version: ${{ matrix.target.nim_branch }}
|
|
architecture: ${{ matrix.target.cpu }}
|
|
|
|
- name: Build koch using existing nim
|
|
run: |
|
|
nim c koch.nim
|
|
|
|
- name: Boot the compiler from the checked-out commit
|
|
shell: bash
|
|
run: |
|
|
./koch boot -d:release
|
|
|
|
- name: Show nim version and system info
|
|
run: |
|
|
bin/nim -v || true
|
|
uname -a || true
|
|
|
|
- name: Run talign test (i386)
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
export PATH="${GITHUB_WORKSPACE}/bin:$PATH"
|
|
nim c -r --mm:refc -d:useGcAssert -d:useSysAssert tests/align/talign.nim
|