From 6cb8165e871ce182851302ab7ccc8098dcbbb394 Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Fri, 13 Jan 2023 13:33:59 +0100 Subject: [PATCH 1/2] ci(*.yml): Use actions/checkout@v3 --- .github/workflows/build-and-test.yml | 6 +++--- .github/workflows/build-macos.yml | 2 +- .github/workflows/deploy-master.yml | 6 +++--- .github/workflows/release.yml | 10 +++++----- .github/workflows/static-builds.yml | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 5cf61191b..9fb851071 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build Docker images run: "make docker-images" - name: Run learn-ocaml build on demo-repository @@ -43,7 +43,7 @@ jobs: USE_CLIENT_IMAGE: 'true' steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build Docker images run: "make docker-images" - name: Pull server_image @@ -66,7 +66,7 @@ jobs: - 'Dockerfile.test-server' steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run docker build run: 'file=${{ matrix.dockerfile }} && docker build -t "learn-ocaml-${file#*.}" -f "$file" .' diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 6cb8c9031..b007df9e3 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -14,6 +14,6 @@ jobs: runs-on: macos-latest steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build learn-ocaml run: 'sh .ci-macosx.sh' diff --git a/.github/workflows/deploy-master.yml b/.github/workflows/deploy-master.yml index 836fe1572..d182c8e48 100644 --- a/.github/workflows/deploy-master.yml +++ b/.github/workflows/deploy-master.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Push to Docker Hub uses: docker/build-push-action@v1 with: @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Push to Docker Hub uses: docker/build-push-action@v1 with: @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Push to Docker Hub # https://github.com/docker/build-push-action/tree/releases/v1#readme uses: docker/build-push-action@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef7468d9f..44bbb2656 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: steps: - name: Check out the repo # Mandatory step (otherwise, hub raises "fatal: Not a git repository") - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Download workflow artifacts # cf. https://github.com/actions/download-artifact/issues/3 uses: dawidd6/action-download-artifact@v2 @@ -84,7 +84,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup bot user run: | git config --global user.email "37002148+proofbot@users.noreply.github.com" @@ -133,7 +133,7 @@ jobs: run: tag="${{ needs.release-please.outputs.tag_name }}"; echo "::set-output name=tag::${tag#v}" id: tag - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Push to Docker Hub uses: docker/build-push-action@v1 with: @@ -154,7 +154,7 @@ jobs: run: tag="${{ needs.release-please.outputs.tag_name }}"; echo "::set-output name=tag::${tag#v}" id: tag - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Push to Docker Hub uses: docker/build-push-action@v1 with: @@ -178,7 +178,7 @@ jobs: run: tag="${{ needs.release-please.outputs.tag_name }}"; echo "::set-output name=tag::${tag#v}" id: tag - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Push to Docker Hub # https://github.com/docker/build-push-action/tree/releases/v1#readme uses: docker/build-push-action@v1 diff --git a/.github/workflows/static-builds.yml b/.github/workflows/static-builds.yml index 7ee2f5acd..a318aad21 100644 --- a/.github/workflows/static-builds.yml +++ b/.github/workflows/static-builds.yml @@ -22,7 +22,7 @@ jobs: # we could use an env var, albeit it would be less convenient steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build learn-ocaml-compilation run: 'docker build -t learn-ocaml-compilation --target=compilation .' - name: 'Build ${{ matrix.arch_dir }}.zip' @@ -45,7 +45,7 @@ jobs: # we could use an env var, albeit it would be less convenient steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build the binaries run: | ./scripts/static-build.sh @@ -77,7 +77,7 @@ jobs: # we could use an env var, albeit it would be less convenient steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Show OS version run: | sw_vers From a99c61b5e43f57c2b84ba75778b286daa7d9b566 Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Fri, 13 Jan 2023 13:53:54 +0100 Subject: [PATCH 2/2] ci(macos): Fix `brew upgrade` failure Related: https://github.com/actions/setup-python/issues/577 --- .ci-macosx.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.ci-macosx.sh b/.ci-macosx.sh index a27cf3415..f28fbc31b 100644 --- a/.ci-macosx.sh +++ b/.ci-macosx.sh @@ -1,12 +1,27 @@ #!/bin/sh -set -e +set -ex sw_vers system_profiler SPSoftwareDataType uname -a brew update + +# homebrew fails to upgrade python due to unlinking failure +# (cf. https://github.com/actions/setup-python/issues/577 ) +rm -f /usr/local/bin/2to3 +rm -f /usr/local/bin/idle3 +rm -f /usr/local/bin/pydoc3 +rm -f /usr/local/bin/python3 +rm -f /usr/local/bin/python3-config +rm -f /usr/local/bin/2to3-3.11 +rm -f /usr/local/bin/idle3.11 +rm -f /usr/local/bin/pydoc3.11 +rm -f /usr/local/bin/python3.11 +rm -f /usr/local/bin/python3.11-config +brew upgrade + brew install pkg-config brew install opam brew install libev