Add wget in arch runners to support stddoc #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build-windows: | |
name: Build & test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
cc: clang | |
bin: palloc-test.exe | |
steps: | |
- uses: actions/checkout@v3 | |
- shell: bash | |
run: | | |
echo "/c/msys64/mingw64/bin" >> $GITHUB_PATH | |
- uses: finwo/stddoc.c@edge | |
name: Install stddoc | |
- uses: finwo/dep@main | |
name: Install dep | |
- name: Install dependencies | |
run: dep install | |
shell: bash | |
- name: Build & check | |
shell: bash | |
run: | | |
make CC=${{ matrix.cc }} BIN=${{ matrix.bin }} | |
make check CC=${{ matrix.cc }} BIN=${{ matrix.bin }} | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ matrix.bin }} | |
file_glob: true | |
overwrite: true | |
tag: ${{ github.ref }} | |
build-linux: | |
name: Build & test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- distro: ubuntu_latest | |
arch: aarch64 | |
cc: gcc | |
bin: palloc-test-aarch64 | |
- distro: ubuntu_latest | |
arch: riscv64 | |
cc: gcc | |
bin: palloc-test-riscv64 | |
- distro: ubuntu_latest | |
arch: none | |
cc: gcc | |
bin: palloc-test-x86_64 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: finwo/dep@main | |
name: Install dep | |
- if: ${{ matrix.arch == 'none' }} | |
uses: finwo/stddoc.c@edge | |
name: Install stddoc | |
- name: Install dependencies | |
run: dep install | |
shell: bash | |
- if: ${{ matrix.arch != 'none' }} | |
uses: uraimo/run-on-arch-action@v2 | |
name: Build & check | |
id: runcmd | |
with: | |
arch: ${{ matrix.arch }} | |
distro: ${{ matrix.distro }} | |
githubToken: ${{ github.token }} | |
install: | | |
apt-get update -yq | |
apt-get install -yq build-essential wget | |
wget https://github.com/finwo/stddoc.c/releases/download/edge/stddoc-lin-${{ matrix.arch }} -o /usr/local/bin/stddoc | |
chmod +x /usr/local/bin/stddoc | |
run: | | |
make CC=${{ matrix.cc }} BIN=${{ matrix.bin }} | |
make check CC=${{ matrix.cc }} BIN=${{ matrix.bin }} | |
- if: ${{ matrix.arch == 'none' }} | |
name: Build | |
shell: bash | |
run: | | |
make CC=${{ matrix.cc }} BIN=${{ matrix.bin }} | |
make check CC=${{ matrix.cc }} BIN=${{ matrix.bin }} | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ matrix.bin }} | |
file_glob: true | |
overwrite: true | |
tag: ${{ github.ref }} |