Skip to content

Commit

Permalink
chore(ci): bump zig version and improve install-zig action.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Oct 22, 2024
1 parent d8ca259 commit 06239e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
15 changes: 6 additions & 9 deletions .github/actions/install-zig/action.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
name: 'install-zig'
description: 'Install zig compiler and make it available in PATH.'

inputs:
sudo:
description: 'Specify a sudo command. Put it empty when sudo is not available.'
required: false
default: 'sudo'

runs:
using: "composite"
steps:
- name: Store zig version as local output
shell: bash
id: store
env:
ZIG_VERSION: '0.14.0-dev.1632+d83a3f174'
ZIG_VERSION: '0.14.0-dev.1952+9f84f7f92'
run: |
echo "zig_version=${ZIG_VERSION}" >> "$GITHUB_OUTPUT"
- name: Create zig install folder
shell: bash
run: mkdir /usr/local/zig

# TODO: this is only needed because we are using a development version of zig,
# since we need https://github.com/ziglang/zig/pull/21253 to be included.
# Development versions of zig are not kept alive forever, but get overridden.
Expand Down Expand Up @@ -48,8 +46,7 @@ runs:
EOF
chmod +x zig-linux-$(uname -m)-${{ steps.store.outputs.zig_version }}/zig-c++
${{ inputs.sudo }} mkdir -p /usr/local/zig/
${{ inputs.sudo }} cp -R zig-linux-$(uname -m)-${{ steps.store.outputs.zig_version }}/* /usr/local/zig/
cp -R zig-linux-$(uname -m)-${{ steps.store.outputs.zig_version }}/* /usr/local/zig/
- name: Setup zig
shell: bash
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ jobs:
- name: Install zig
if: matrix.name == 'zig'
uses: ./.github/actions/install-zig
with:
sudo: ''

- name: Build and test 🏗️🧪
env:
Expand Down

0 comments on commit 06239e6

Please sign in to comment.