Skip to content

refactor(diag): allow Diag_List to be moved #6532

refactor(diag): allow Diag_List to be moved

refactor(diag): allow Diag_List to be moved #6532

# Copyright (C) 2020 Matthew Glazar
# See end of file for extended copyright information.
name: build and test Linux Ninja developer instructions
on:
push:
pull_request:
types: [opened, synchronize]
# Based on website/public/contribute/build-from-source/.
jobs:
build:
name: ${{ matrix.toolchain.name }}
strategy:
fail-fast: false
matrix:
toolchain:
- {docker_container: "archlinux:base", name: "Arch Linux", install_dependencies_script: "pacman -Syyuu --noconfirm cmake gcc ninja", extra_environment: ""}
- {docker_container: "debian:bullseye", name: "Debian 11 Bullseye", install_dependencies_script: "apt-get update && apt-get install -y cmake g++ ninja-build", extra_environment: ""}
- {docker_container: "debian:buster", name: "Debian 10 Buster", install_dependencies_script: "apt-get update && apt-get install -y cmake g++ ninja-build", extra_environment: ""}
- {docker_container: "fedora:38", name: "Fedora 38", install_dependencies_script: "dnf install -y cmake gcc-c++ ninja-build", extra_environment: ""}
- {docker_container: "ubuntu:20.04", name: "Ubuntu 20.04 LTS Focal", install_dependencies_script: "apt-get update && apt-get install -y cmake g++ ninja-build", extra_environment: ""}
- {docker_container: "ubuntu:22.04", name: "Ubuntu 22.04 LTS Jammy", install_dependencies_script: "apt-get update && apt-get install -y cmake g++ ninja-build", extra_environment: ""}
runs-on: ubuntu-latest
container:
image: ${{ matrix.toolchain.docker_container }}
steps:
- name: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: 0. Install build dependencies
run: ${{ matrix.toolchain.install_dependencies_script }}
- name: 1. Configure with CMake
run: |
mkdir build ; cd build ; ${{ matrix.toolchain.extra_environment }} cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug .. ; cd "$OLDPWD"
if ! [ -f docs/FUZZING.md ]; then
printf 'error: cwd changed unexpectedly\n' >&2
exit 1
fi
- name: 2. Build
run: |
ninja -C build
ninja -C build quick-lint-js
ninja -C build quick-lint-js-test
- name: 3. Run
run: |
./build/test/quick-lint-js-test
./build/quick-lint-js --help
# quick-lint-js finds bugs in JavaScript programs.
# Copyright (C) 2020 Matthew Glazar
#
# This file is part of quick-lint-js.
#
# quick-lint-js is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# quick-lint-js is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with quick-lint-js. If not, see <https://www.gnu.org/licenses/>.