mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
CI: Move non-coverage FreeBSD Cirrus CI jobs to GitHub Actions
By running them in a qemu VM on Linux runners.
This commit is contained in:
parent
97b6521eb0
commit
f221cb335f
2 changed files with 83 additions and 17 deletions
17
.cirrus.yml
17
.cirrus.yml
|
@ -63,24 +63,7 @@ freebsd13_task:
|
||||||
OS_NAME: freebsd
|
OS_NAME: freebsd
|
||||||
CI_DFLAGS: -version=TARGET_FREEBSD13
|
CI_DFLAGS: -version=TARGET_FREEBSD13
|
||||||
matrix:
|
matrix:
|
||||||
- TASK_NAME_TYPE: latest
|
|
||||||
- TASK_NAME_TYPE: coverage
|
- TASK_NAME_TYPE: coverage
|
||||||
<< : *COVERAGE_ENVIRONMENT_TEMPLATE
|
<< : *COVERAGE_ENVIRONMENT_TEMPLATE
|
||||||
install_bash_script: pkg install -y bash
|
install_bash_script: pkg install -y bash
|
||||||
<< : *COMMON_STEPS_TEMPLATE
|
<< : *COMMON_STEPS_TEMPLATE
|
||||||
|
|
||||||
freebsd12_task:
|
|
||||||
name: FreeBSD 12.3 x64, DMD (bootstrap)
|
|
||||||
freebsd_instance:
|
|
||||||
image_family: freebsd-12-3
|
|
||||||
cpu: 4
|
|
||||||
memory: 8G
|
|
||||||
timeout_in: 60m
|
|
||||||
environment:
|
|
||||||
OS_NAME: freebsd
|
|
||||||
HOST_DMD: dmd-2.095.0
|
|
||||||
CI_DFLAGS: -version=TARGET_FREEBSD12
|
|
||||||
install_bash_script: |
|
|
||||||
sed -i '' -e 's|pkg.FreeBSD.org|mirrors.xtom.com/freebsd-pkg|' /etc/pkg/FreeBSD.conf
|
|
||||||
pkg install -y bash
|
|
||||||
<< : *COMMON_STEPS_TEMPLATE
|
|
||||||
|
|
83
.github/workflows/main.yml
vendored
83
.github/workflows/main.yml
vendored
|
@ -115,3 +115,86 @@ jobs:
|
||||||
- name: Upload coverage report
|
- name: Upload coverage report
|
||||||
if: matrix.coverage
|
if: matrix.coverage
|
||||||
run: ci/run.sh codecov
|
run: ci/run.sh codecov
|
||||||
|
|
||||||
|
freebsd-vm:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- job_name: FreeBSD 13.2 x64, DMD (latest)
|
||||||
|
freebsd_version: '13.2'
|
||||||
|
host_dmd: dmd
|
||||||
|
- job_name: FreeBSD 12.4 x64, DMD (bootstrap)
|
||||||
|
freebsd_version: '12.4'
|
||||||
|
host_dmd: dmd-2.095.0
|
||||||
|
name: ${{ matrix.job_name }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 60
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 50
|
||||||
|
- name: Run in qemu VM
|
||||||
|
uses: cross-platform-actions/action@v0.19.0
|
||||||
|
with:
|
||||||
|
operating_system: freebsd
|
||||||
|
version: ${{ matrix.freebsd_version }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -uexo pipefail
|
||||||
|
|
||||||
|
freebsd_version='${{ matrix.freebsd_version }}'
|
||||||
|
freebsd_major="${freebsd_version:0:2}"
|
||||||
|
|
||||||
|
export OS_NAME=freebsd
|
||||||
|
export MODEL=64
|
||||||
|
export HOST_DMD='${{ matrix.host_dmd }}'
|
||||||
|
export N=2
|
||||||
|
export FULL_BUILD=true
|
||||||
|
export CI_DFLAGS="-version=TARGET_FREEBSD${freebsd_major}"
|
||||||
|
|
||||||
|
#if [[ "$freebsd_major" == 12 ]]; then
|
||||||
|
# sudo sed -i '' -e 's|pkg.FreeBSD.org|mirrors.xtom.com/freebsd-pkg|' /etc/pkg/FreeBSD.conf
|
||||||
|
#fi
|
||||||
|
|
||||||
|
bash --version
|
||||||
|
|
||||||
|
echo '::group::Install prerequisites'
|
||||||
|
sudo -E ci/cirrusci.sh
|
||||||
|
echo '::endgroup::'
|
||||||
|
|
||||||
|
echo '::group::Install host compiler'
|
||||||
|
ci/run.sh install_host_compiler
|
||||||
|
echo '::endgroup::'
|
||||||
|
|
||||||
|
echo '::group::Set up repos'
|
||||||
|
ln -s "$PWD" ../dmd
|
||||||
|
|
||||||
|
ref='${{ github.ref }}'
|
||||||
|
if [[ "$ref" =~ ^refs/pull/ ]]; then
|
||||||
|
REPO_BRANCH="$GITHUB_BASE_REF"
|
||||||
|
elif [[ "$ref" =~ ^refs/(heads|tags)/(.*)$ ]]; then
|
||||||
|
REPO_BRANCH="${BASH_REMATCH[2]}"
|
||||||
|
else
|
||||||
|
echo "Error: unexpected GitHub ref '$ref'" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ci/run.sh setup_repos "$REPO_BRANCH"
|
||||||
|
echo '::endgroup::'
|
||||||
|
|
||||||
|
echo '::group::Build'
|
||||||
|
ci/run.sh build
|
||||||
|
echo '::endgroup::'
|
||||||
|
|
||||||
|
echo '::group::Test dmd'
|
||||||
|
ci/run.sh test_dmd
|
||||||
|
echo '::endgroup::'
|
||||||
|
|
||||||
|
echo '::group::Test druntime'
|
||||||
|
ci/run.sh test_druntime
|
||||||
|
echo '::endgroup::'
|
||||||
|
|
||||||
|
echo '::group::Test phobos'
|
||||||
|
ci/run.sh test_phobos
|
||||||
|
echo '::endgroup::'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue