CI: fix and fmt

install alsa lib on linux platform
This commit is contained in:
Ali Chraghi 2022-07-23 12:54:42 +04:30 committed by Stephen Gutekanst
parent 1b9607be3f
commit a8427dcb4b
4 changed files with 27 additions and 28 deletions

View file

@ -18,11 +18,11 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setup Zig - name: Setup Zig
run: | run: |
sudo apt install xz-utils sudo apt install xz-utils libasound2-dev
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.3027+0e26c6149.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.3027+0e26c6149.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
- name: x86_64-linux -> x86_64-linux-musl - name: x86_64-linux -> x86_64-linux-musl
if: matrix.project == 'freetype' || matrix.project == 'glfw' if: matrix.project == 'freetype' || matrix.project == 'glfw'
run: cd ${{ matrix.project }} && zig build -Dtarget=x86_64-linux-mul run: cd ${{ matrix.project }} && zig build -Dtarget=x86_64-linux-musl
- name: x86_64-linux -> x86_64-macos - name: x86_64-linux -> x86_64-macos
run: cd ${{ matrix.project }} && zig build -Dtarget=x86_64-macos.12-none run: cd ${{ matrix.project }} && zig build -Dtarget=x86_64-macos.12-none
env: env:
@ -63,10 +63,10 @@ jobs:
- name: Setup Zig - name: Setup Zig
run: | run: |
$ProgressPreference = 'SilentlyContinue' $ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.3027+0e26c6149.zip" -OutFile "C:\zig.zip" Invoke-WebRequest -Uri 'https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.3027+0e26c6149.zip' -OutFile 'C:\zig.zip'
cd C:\ cd C:\
7z x zig.zip 7z x zig.zip
Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.10.0-dev.3027+0e26c6149\" Add-Content $env:GITHUB_PATH 'C:\zig-windows-x86_64-0.10.0-dev.3027+0e26c6149\'
- name: compile all examples - name: compile all examples
if: matrix.project == '.' if: matrix.project == '.'
run: cd ${{ matrix.project }} && zig build compile-all run: cd ${{ matrix.project }} && zig build compile-all
@ -88,8 +88,7 @@ jobs:
brew uninstall --ignore-dependencies libx11 # https://github.com/ziglang/zig/issues/11066 brew uninstall --ignore-dependencies libx11 # https://github.com/ziglang/zig/issues/11066
brew install xz brew install xz
sudo sh -c 'wget -c https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.3027+0e26c6149.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' sudo sh -c 'wget -c https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.3027+0e26c6149.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
- name: test - name: test
run: cd ${{ matrix.project }} && zig build test run: cd ${{ matrix.project }} && zig build test
env: env:
AGREE: true AGREE: true

View file

@ -5,7 +5,7 @@ on:
# collaborators of the repository only. # collaborators of the repository only.
# #
# Whenever GitHub Actions gets official M1 support, we can use that for PRs and get rid of this # Whenever GitHub Actions gets official M1 support, we can use that for PRs and get rid of this
# self-hosted runner: https://github.com/actions/virtual-environments/issues/2187 # self-hosted runner: https://github.com/actions/virtual-environments/issues/2187
- push - push
jobs: jobs:
aarch64-macos: aarch64-macos:
@ -13,7 +13,7 @@ jobs:
runs-on: [self-hosted, macOS, ARM64] runs-on: [self-hosted, macOS, ARM64]
strategy: strategy:
matrix: matrix:
project: ['.', 'glfw', 'freetype'] project: [".", "glfw", "freetype"]
defaults: defaults:
run: run:
shell: "/usr/bin/arch -arch arm64e /bin/bash --noprofile --norc -eo pipefail {0}" shell: "/usr/bin/arch -arch arm64e /bin/bash --noprofile --norc -eo pipefail {0}"

View file

@ -2,23 +2,23 @@ name: Push to subrepositories
on: on:
push: push:
branches: branches:
- 'main' - "main"
jobs: jobs:
push: push:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
# fetch full Git history, otherwise push-subrepos.sh would fail due to not being able to # fetch full Git history, otherwise push-subrepos.sh would fail due to not being able to
# split the git subtree. # split the git subtree.
fetch-depth: 0 fetch-depth: 0
- name: 'Push recent commits to subrepositories' - name: "Push recent commits to subrepositories"
env: env:
ACCESS_TOKEN: ${{ secrets.HEXOPS_MACH_PUSH_SUBREPOS }} ACCESS_TOKEN: ${{ secrets.HEXOPS_MACH_PUSH_SUBREPOS }}
run: | run: |
git config user.name 'Repository synchronization automation' git config user.name 'Repository synchronization automation'
git config user.email 'stephen@hexops.com' git config user.email 'stephen@hexops.com'
# See https://github.community/t/automating-push-to-public-repo/17742/12 # See https://github.community/t/automating-push-to-public-repo/17742/12
git config -l | grep 'http\..*\.extraheader' | cut -d= -f1 | xargs -L1 git config --unset-all git config -l | grep 'http\..*\.extraheader' | cut -d= -f1 | xargs -L1 git config --unset-all
./dev/push-subrepos.sh ./dev/push-subrepos.sh

View file

@ -65,7 +65,7 @@ jobs:
- name: test - name: test
run: zig build test run: zig build test
x86_64-macos: x86_64-macos:
runs-on: macos-latest runs-on: macos-12
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push # We want to run on external PRs, but not on our own internal PRs as they'll be run by the push
# to the branch. # to the branch.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository