From a8427dcb4b785392606c823e88cd6f938d51b110 Mon Sep 17 00:00:00 2001 From: Ali Chraghi Date: Sat, 23 Jul 2022 12:54:42 +0430 Subject: [PATCH] CI: fix and fmt install alsa lib on linux platform --- .github/workflows/ci.yml | 17 ++++++++------- .github/workflows/m1_ci.yml | 4 ++-- .github/workflows/push_subrepos.yml | 32 ++++++++++++++--------------- glfw/.github/workflows/ci.yml | 2 +- 4 files changed, 27 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1cae6e9f..02be02c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,11 +18,11 @@ jobs: uses: actions/checkout@v2 - name: Setup Zig 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' - name: x86_64-linux -> x86_64-linux-musl 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 run: cd ${{ matrix.project }} && zig build -Dtarget=x86_64-macos.12-none env: @@ -63,10 +63,10 @@ jobs: - name: Setup Zig run: | $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:\ 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 if: matrix.project == '.' 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 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' - - name: test - run: cd ${{ matrix.project }} && zig build test - env: - AGREE: true - + - name: test + run: cd ${{ matrix.project }} && zig build test + env: + AGREE: true diff --git a/.github/workflows/m1_ci.yml b/.github/workflows/m1_ci.yml index 89ae4e9f..7ab38dd9 100644 --- a/.github/workflows/m1_ci.yml +++ b/.github/workflows/m1_ci.yml @@ -5,7 +5,7 @@ on: # collaborators of the repository only. # # 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 jobs: aarch64-macos: @@ -13,7 +13,7 @@ jobs: runs-on: [self-hosted, macOS, ARM64] strategy: matrix: - project: ['.', 'glfw', 'freetype'] + project: [".", "glfw", "freetype"] defaults: run: shell: "/usr/bin/arch -arch arm64e /bin/bash --noprofile --norc -eo pipefail {0}" diff --git a/.github/workflows/push_subrepos.yml b/.github/workflows/push_subrepos.yml index 52382283..885a29bd 100644 --- a/.github/workflows/push_subrepos.yml +++ b/.github/workflows/push_subrepos.yml @@ -2,23 +2,23 @@ name: Push to subrepositories on: push: branches: - - 'main' + - "main" jobs: push: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - with: - # fetch full Git history, otherwise push-subrepos.sh would fail due to not being able to - # split the git subtree. - fetch-depth: 0 - - name: 'Push recent commits to subrepositories' - env: - ACCESS_TOKEN: ${{ secrets.HEXOPS_MACH_PUSH_SUBREPOS }} - run: | - git config user.name 'Repository synchronization automation' - git config user.email 'stephen@hexops.com' - # 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 - ./dev/push-subrepos.sh + - name: Checkout + uses: actions/checkout@v2 + with: + # fetch full Git history, otherwise push-subrepos.sh would fail due to not being able to + # split the git subtree. + fetch-depth: 0 + - name: "Push recent commits to subrepositories" + env: + ACCESS_TOKEN: ${{ secrets.HEXOPS_MACH_PUSH_SUBREPOS }} + run: | + git config user.name 'Repository synchronization automation' + git config user.email 'stephen@hexops.com' + # 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 + ./dev/push-subrepos.sh diff --git a/glfw/.github/workflows/ci.yml b/glfw/.github/workflows/ci.yml index fab68358..e4a04b19 100644 --- a/glfw/.github/workflows/ci.yml +++ b/glfw/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: - name: test run: zig build test 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 # to the branch. if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository