From a599850498a6dcd8c145caa72e4526f32e94fd78 Mon Sep 17 00:00:00 2001 From: war-in Date: Fri, 1 Mar 2024 11:20:22 +0100 Subject: [PATCH 1/4] installation script check --- .github/workflows/ci.yml | 39 ------------- .../workflows/installation_script_check.yml | 55 +++++++++++++++++++ 2 files changed, 55 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/installation_script_check.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc93070..7169175 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,42 +46,3 @@ jobs: - uses: actions/checkout@v4 - name: typos-action uses: crate-ci/typos@v1.16.23 - - verify-installation-script: - name: Verify installation script - runs-on: ${{ matrix.os }} - - strategy: - matrix: - include: - - target: x86_64-unknown-linux-gnu - os: ubuntu-latest - - - target: x86_64-unknown-linux-musl - os: ubuntu-latest - - - target: aarch64-unknown-linux-gnu - os: ubuntu-latest - - - target: aarch64-unknown-linux-musl - os: ubuntu-latest - - - target: x86_64-apple-darwin - os: macos-latest - - - target: aarch64-apple-darwin - os: macos-latest - - steps: - - uses: actions/checkout@v4 - - - name: Install and check - run: | - bash ./scripts/install.sh - - source ~/.bashrc - - if ! command -v universal-sierra-compiler &> /dev/null; then - echo "universal-sierra-compiler was not installed" - exit 1 - fi diff --git a/.github/workflows/installation_script_check.yml b/.github/workflows/installation_script_check.yml new file mode 100644 index 0000000..d70fcd6 --- /dev/null +++ b/.github/workflows/installation_script_check.yml @@ -0,0 +1,55 @@ +name: Check installation script + +on: + pull_request: + paths: + - scripts/install.sh + merge_group: + paths: + - scripts/install.sh + push: + branches: + - master + paths: + - scripts/install.sh + +jobs: + verify-installation-script: + name: Verify installation script + runs-on: ${{ matrix.os }} + + strategy: + matrix: + include: + - target: x86_64-unknown-linux-gnu + os: ubuntu-latest + + - target: x86_64-unknown-linux-musl + os: ubuntu-latest + + - target: aarch64-unknown-linux-gnu + os: ubuntu-latest + + - target: aarch64-unknown-linux-musl + os: ubuntu-latest + + - target: x86_64-apple-darwin + os: macos-latest + + - target: aarch64-apple-darwin + os: macos-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install and check + shell: bash + run: | + bash ./scripts/install.sh + + source ~/.bashrc + + if ! command -v cairo-profiler &> /dev/null; then + echo "cairo-profiler was not installed" + exit 1 + fi From d45902b7f1872b2330f2516633dcc31c53aef398 Mon Sep 17 00:00:00 2001 From: war-in Date: Fri, 1 Mar 2024 11:26:10 +0100 Subject: [PATCH 2/4] check if checks will run --- scripts/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install.sh b/scripts/install.sh index 17790db..fcd7f09 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -8,6 +8,8 @@ main () { check_cmd curl check_cmd tar + ls + version=${1:-latest} release_tag=$(curl -# --fail -Ls -H 'Accept: application/json' "${REPO}/releases/{$version}" | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') From 6912f4d6160890ca75d4415fcafc73c5e8b933b0 Mon Sep 17 00:00:00 2001 From: war-in Date: Fri, 1 Mar 2024 11:27:58 +0100 Subject: [PATCH 3/4] fix check --- .github/workflows/installation_script_check.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/installation_script_check.yml b/.github/workflows/installation_script_check.yml index d70fcd6..20c6994 100644 --- a/.github/workflows/installation_script_check.yml +++ b/.github/workflows/installation_script_check.yml @@ -43,13 +43,11 @@ jobs: - uses: actions/checkout@v4 - name: Install and check - shell: bash run: | bash ./scripts/install.sh - source ~/.bashrc - if ! command -v cairo-profiler &> /dev/null; then - echo "cairo-profiler was not installed" + if ! command -v universal-sierra-compiler &> /dev/null; then + echo "universal-sierra-compiler was not installed" exit 1 fi From a20bb7c2be5b16eae433d3026996c80f73912be6 Mon Sep 17 00:00:00 2001 From: war-in Date: Fri, 1 Mar 2024 11:29:41 +0100 Subject: [PATCH 4/4] Revert "check if checks will run" This reverts commit d45902b7f1872b2330f2516633dcc31c53aef398. --- scripts/install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index fcd7f09..17790db 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -8,8 +8,6 @@ main () { check_cmd curl check_cmd tar - ls - version=${1:-latest} release_tag=$(curl -# --fail -Ls -H 'Accept: application/json' "${REPO}/releases/{$version}" | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')