Skip to content

Rename TestSuite.tests to instances #310

Rename TestSuite.tests to instances

Rename TestSuite.tests to instances #310

Workflow file for this run

# Repository permission needs `Read and write permissions` setting selected under `Workflow permissions` to allow to update/create new tag
name: CI
on:
push: # test + build + release
branches: [ master ]
pull_request: # test + build
branches: [ master ]
release: # test + build + release
types: [ published ]
env:
DC: ldc-1.41.0-beta1
defaults:
run:
shell: bash
jobs:
build_vanilla_d:
name: Build vanilla D
strategy:
matrix:
os: [ubuntu-latest, macos-15-intel, windows-latest]
build: [debug-fast, release-fast]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ env.DC }}
- name: Build
run: |
./build/setup.sh
./build/builder --action=build --remove-build \
--build=${{matrix.build}} \
--config=nih-cli,nih-static,nih-shared,vbe-static,vbe-shared \
--compiler=ldc2 --print-commands --print-total-time \
--print-callees --pretty --color
build_no_deps:
strategy:
matrix:
os:
- runner: ubuntu-latest
target: x64-linux
- runner: macos-15-intel
target: x64-macos
#- runner: macos-14
# target: arm64-macos
- runner: windows-latest
target: x64-windows
v:
- build: debug-fast,release-fast
config: nih-cli,nih-static,nih-shared,vbe-static,vbe-shared
- build: debug
config: testsuite
include:
- os:
runner: ubuntu-latest
target: wasm32-wasi
v:
build: debug
config: testsuite
- os:
runner: ubuntu-latest
target: wasm32-wasi
v:
build: release-fast
config: nih-cli
- os:
runner: ubuntu-latest
target: arm64-linux
v:
build: debug
config: testsuite
- os:
runner: ubuntu-latest
target: arm64-linux
v:
build: release-fast
config: nih-cli,nih-static,nih-shared,vbe-static,vbe-shared
- os:
runner: ubuntu-latest
target: wasm32-unknown
v:
build: release-fast
config: nih-cli,nih-shared,vbe-shared
exclude:
# https://github.com/ldc-developers/ldc/issues/4696
- os:
runner: ubuntu-latest
target: arm64-linux
v:
build: debug-fast
name: Build ${{ matrix.os.target }}-${{ matrix.v.build }}-${{ matrix.v.config }}
runs-on: ${{ matrix.os.runner }}
steps:
- uses: actions/checkout@v4
- uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ env.DC }}
- name: Build
run: |
./build/setup.sh
./build/builder --action=pack --remove-build --no-deps \
--build=${{ matrix.v.build }} \
--target-relaxed=${{ matrix.os.target }} \
--config=${{ matrix.v.config }} \
--compiler=ldc2 --print-commands --print-total-time \
--print-callees --pretty --color
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.os.target }}-${{ matrix.v.build }}-${{ matrix.v.config }}
path: bin/
test:
name: Test suite ${{ matrix.os.target }}
strategy:
matrix:
os:
- runner: ubuntu-latest
target: x64-linux
- runner: macos-15-intel
target: x64-macos
#- runner: macos-14
# target: arm64-macos
- runner: windows-latest
target: x64-windows
- runner: ubuntu-latest
target: wasm32-wasi
- runner: ubuntu-latest
target: arm64-linux
runs-on: ${{ matrix.os.runner }}
steps:
- uses: actions/checkout@v4
- uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ env.DC }}
- uses: jcbhmr/setup-wasmtime@v2
if: ${{ matrix.os.target == 'wasm32-wasi' }}
- if: ${{ matrix.os.target == 'arm64-linux' }}
run: |
sudo apt update
sudo apt install qemu-user
- name: Test
run: |
./build/setup.sh
./build/builder --action=run --remove-build --no-deps --build=debug \
--target-relaxed=${{ matrix.os.target }} --config=testsuite \
--compiler=ldc2 --print-commands --print-callees --pretty --color
upload:
name: Upload build
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
needs: [build_no_deps, test]
steps:
# Cloning is needed for `gh release create` to work. It looks repository up in .git folder
- uses: actions/checkout@v4
# Download build artifacts of other jobs
- uses: actions/download-artifact@v4
with:
pattern: artifact-*
merge-multiple: true
path: bin/
# Update tag, so that we get proper date and commit on github
- name: Update CI tag
uses: richardsimko/[email protected]
if: github.ref == 'refs/heads/master'
with:
tag_name: CI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Create CI release and upload builds
- name: Upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ls -R
tag=`basename ${{ github.ref }}`
if [ $tag = 'master' ]; then
tag='CI'
fi
# --clobber Overwrite existing assets of the same name
gh release upload $tag bin/*.zip --clobber