2024-05-08 16:26:12 -05:00
|
|
|
name: Test extra build flows
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
pre_job:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
|
|
|
steps:
|
|
|
|
- id: skip_check
|
|
|
|
uses: fkirc/skip-duplicate-actions@v5
|
|
|
|
with:
|
|
|
|
paths_ignore: '["**/README.md", "docs/**", "guidelines/**"]'
|
|
|
|
# cancel previous builds if a new commit is pushed
|
|
|
|
cancel_others: 'true'
|
2024-05-08 16:26:18 -05:00
|
|
|
# only run on push *or* pull_request, not both
|
|
|
|
concurrent_skipping: 'same_content_newer'
|
2024-05-08 16:26:12 -05:00
|
|
|
|
|
|
|
vs-prep:
|
|
|
|
name: Prepare Visual Studio build
|
|
|
|
runs-on: ubuntu-latest
|
2024-05-09 01:17:04 -05:00
|
|
|
needs: [pre_job]
|
|
|
|
if: needs.pre_job.outputs.should_skip != 'true'
|
2024-05-08 16:26:12 -05:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Build
|
|
|
|
run: make vcxsrc YOSYS_VER=latest
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: vcxsrc
|
|
|
|
path: yosys-win32-vcxsrc-latest.zip
|
|
|
|
|
|
|
|
vs-build:
|
|
|
|
name: Visual Studio build
|
|
|
|
runs-on: windows-2019
|
2024-05-08 16:26:17 -05:00
|
|
|
needs: [vs-prep, pre_job]
|
2024-05-08 16:26:12 -05:00
|
|
|
if: needs.pre_job.outputs.should_skip != 'true'
|
|
|
|
steps:
|
|
|
|
- uses: actions/download-artifact@v4
|
|
|
|
with:
|
|
|
|
name: vcxsrc
|
|
|
|
path: .
|
|
|
|
- name: unzip
|
|
|
|
run: unzip yosys-win32-vcxsrc-latest.zip
|
|
|
|
- name: setup-msbuild
|
2024-05-09 01:16:05 -05:00
|
|
|
uses: microsoft/setup-msbuild@v2
|
2024-05-08 16:26:12 -05:00
|
|
|
- name: MSBuild
|
|
|
|
working-directory: yosys-win32-vcxsrc-latest
|
|
|
|
run: msbuild YosysVS.sln /p:PlatformToolset=v142 /p:Configuration=Release /p:WindowsTargetPlatformVersion=10.0.17763.0
|
|
|
|
|
|
|
|
wasi-build:
|
|
|
|
name: WASI build
|
|
|
|
needs: pre_job
|
|
|
|
if: needs.pre_job.outputs.should_skip != 'true'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
WASI_SDK=wasi-sdk-19.0
|
|
|
|
WASI_SDK_URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz
|
|
|
|
if ! [ -d ${WASI_SDK} ]; then curl -L ${WASI_SDK_URL} | tar xzf -; fi
|
|
|
|
|
|
|
|
mkdir -p build
|
|
|
|
cat > build/Makefile.conf <<END
|
|
|
|
export PATH := $(pwd)/${WASI_SDK}/bin:${PATH}
|
|
|
|
WASI_SYSROOT := $(pwd)/${WASI_SDK}/share/wasi-sysroot
|
|
|
|
|
|
|
|
CONFIG := wasi
|
|
|
|
PREFIX := /
|
|
|
|
|
|
|
|
ENABLE_TCL := 0
|
|
|
|
ENABLE_READLINE := 0
|
|
|
|
ENABLE_PLUGINS := 0
|
|
|
|
ENABLE_ZLIB := 0
|
|
|
|
END
|
|
|
|
|
|
|
|
make -C build -f ../Makefile CXX=clang -j$(nproc)
|
2024-05-23 16:09:48 -05:00
|
|
|
|
|
|
|
nix-build:
|
|
|
|
name: "Build nix flake"
|
|
|
|
needs: pre_job
|
|
|
|
if: needs.pre_job.outputs.should_skip != 'true'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
2024-05-23 16:41:31 -05:00
|
|
|
submodules: true
|
2024-05-23 16:09:48 -05:00
|
|
|
- uses: cachix/install-nix-action@v26
|
|
|
|
with:
|
2024-05-23 16:41:31 -05:00
|
|
|
install_url: https://releases.nixos.org/nix/nix-2.18.1/install
|
2024-05-23 16:09:48 -05:00
|
|
|
- run: nix build .?submodules=1
|