fix ci and update all used actions
This commit is contained in:
4
.github/actions/setup-rust/action.yml
vendored
4
.github/actions/setup-rust/action.yml
vendored
@@ -33,7 +33,7 @@ runs:
|
|||||||
echo "CC=clang" >> $GITHUB_ENV
|
echo "CC=clang" >> $GITHUB_ENV
|
||||||
echo "PKG_CONFIG_SYSROOT_DIR=/" >> $GITHUB_ENV
|
echo "PKG_CONFIG_SYSROOT_DIR=/" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
@@ -46,7 +46,7 @@ runs:
|
|||||||
# Remove build artifacts for the current crate, since it will be rebuilt every
|
# Remove build artifacts for the current crate, since it will be rebuilt every
|
||||||
# run anyway, but keep dependency artifacts to cache them.
|
# run anyway, but keep dependency artifacts to cache them.
|
||||||
# Must be placed after actions/cache so its post step runs first.
|
# Must be placed after actions/cache so its post step runs first.
|
||||||
- uses: pyTooling/Actions/with-post-step@v0.4.6
|
- uses: pyTooling/Actions/with-post-step@v4.1.0
|
||||||
with:
|
with:
|
||||||
main: bash ./.github/actions/setup-rust/cleanup.sh
|
main: bash ./.github/actions/setup-rust/cleanup.sh
|
||||||
post: bash ./.github/actions/setup-rust/cleanup.sh
|
post: bash ./.github/actions/setup-rust/cleanup.sh
|
||||||
|
|||||||
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
style:
|
style:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
uses: ./.github/actions/setup-rust
|
uses: ./.github/actions/setup-rust
|
||||||
with:
|
with:
|
||||||
@@ -55,7 +55,7 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actionhippie/swap-space@v1
|
- uses: actionhippie/swap-space@v1
|
||||||
if: matrix.use_swap
|
if: matrix.use_swap
|
||||||
with:
|
with:
|
||||||
@@ -88,7 +88,7 @@ jobs:
|
|||||||
echo "$PWD/target/release" >> $GITHUB_PATH
|
echo "$PWD/target/release" >> $GITHUB_PATH
|
||||||
- name: Publish release binary artifact
|
- name: Publish release binary artifact
|
||||||
if: matrix.publish
|
if: matrix.publish
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: target/${{ matrix.target }}/release/scryer-prolog*
|
path: target/${{ matrix.target }}/release/scryer-prolog*
|
||||||
name: scryer-prolog_${{ matrix.os }}_${{ matrix.target }}
|
name: scryer-prolog_${{ matrix.os }}_${{ matrix.target }}
|
||||||
@@ -99,7 +99,7 @@ jobs:
|
|||||||
needs: [build-test]
|
needs: [build-test]
|
||||||
steps:
|
steps:
|
||||||
# Download prebuilt ubuntu binary from build-test job, setup logtalk
|
# Download prebuilt ubuntu binary from build-test job, setup logtalk
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: scryer-prolog_ubuntu-20.04_x86_64-unknown-linux-gnu
|
name: scryer-prolog_ubuntu-20.04_x86_64-unknown-linux-gnu
|
||||||
- run: |
|
- run: |
|
||||||
@@ -123,12 +123,12 @@ jobs:
|
|||||||
|| echo "::warning ::logtalk compliance suite failed"
|
|| echo "::warning ::logtalk compliance suite failed"
|
||||||
# -u "https://github.com/LogtalkDotOrg/logtalk3/tree/$LOGTALK_GIT_HASH/tests/prolog/" \
|
# -u "https://github.com/LogtalkDotOrg/logtalk3/tree/$LOGTALK_GIT_HASH/tests/prolog/" \
|
||||||
- name: Publish Logtalk test logs
|
- name: Publish Logtalk test logs
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: logtalk-test-logs
|
name: logtalk-test-logs
|
||||||
path: '${{ env.LOGTALKUSER }}/tests/prolog/logtalk_tester_logs'
|
path: '${{ env.LOGTALKUSER }}/tests/prolog/logtalk_tester_logs'
|
||||||
- name: Publish Logtalk test results artifact
|
- name: Publish Logtalk test results artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: logtalk-test-results
|
name: logtalk-test-results
|
||||||
path: '${{ env.LOGTALKUSER }}/tests/prolog/**/*.xml'
|
path: '${{ env.LOGTALKUSER }}/tests/prolog/**/*.xml'
|
||||||
@@ -143,7 +143,7 @@ jobs:
|
|||||||
report:
|
report:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
uses: ./.github/actions/setup-rust
|
uses: ./.github/actions/setup-rust
|
||||||
with:
|
with:
|
||||||
@@ -162,7 +162,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
RUSTC_BOOTSTRAP=1 cargo test --all -- -Z unstable-options --format json --report-time | cargo2junit > cargo_test_results.xml
|
RUSTC_BOOTSTRAP=1 cargo test --all -- -Z unstable-options --format json --report-time | cargo2junit > cargo_test_results.xml
|
||||||
- name: Publish cargo test results artifact
|
- name: Publish cargo test results artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: cargo-test-results
|
name: cargo-test-results
|
||||||
path: cargo_test_results.xml
|
path: cargo_test_results.xml
|
||||||
@@ -181,7 +181,7 @@ jobs:
|
|||||||
- run: cargo bench --bench run_criterion -- --profile-time 60
|
- run: cargo bench --bench run_criterion -- --profile-time 60
|
||||||
|
|
||||||
- name: Publish benchmark results
|
- name: Publish benchmark results
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: benchmark-results
|
name: benchmark-results
|
||||||
path: |
|
path: |
|
||||||
@@ -195,7 +195,7 @@ jobs:
|
|||||||
needs: [build-test]
|
needs: [build-test]
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v4
|
||||||
- name: Zip binaries for release
|
- name: Zip binaries for release
|
||||||
run: |
|
run: |
|
||||||
zip scryer-prolog_macos-11.zip ./scryer-prolog_macos-11_x86_64-apple-darwin/scryer-prolog
|
zip scryer-prolog_macos-11.zip ./scryer-prolog_macos-11_x86_64-apple-darwin/scryer-prolog
|
||||||
@@ -204,7 +204,7 @@ jobs:
|
|||||||
zip scryer-prolog_windows-latest.zip ./scryer-prolog_windows-latest_x86_64-pc-windows-msvc/scryer-prolog.exe
|
zip scryer-prolog_windows-latest.zip ./scryer-prolog_windows-latest_x86_64-pc-windows-msvc/scryer-prolog.exe
|
||||||
zip scryer-prolog_wasm32.zip ./scryer-prolog_ubuntu-22.04_wasm32-unknown-unknown/scryer-prolog.wasm
|
zip scryer-prolog_wasm32.zip ./scryer-prolog_ubuntu-22.04_wasm32-unknown-unknown/scryer-prolog.wasm
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
scryer-prolog_macos-11.zip
|
scryer-prolog_macos-11.zip
|
||||||
|
|||||||
16
.github/workflows/docker-publish.yml
vendored
16
.github/workflows/docker-publish.yml
vendored
@@ -14,17 +14,17 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# Workaround: https://github.com/docker/build-push-action/issues/461
|
# Workaround: https://github.com/docker/build-push-action/issues/461
|
||||||
- name: Setup Docker buildx
|
- name: Setup Docker buildx
|
||||||
# https://github.com/docker/setup-buildx-action
|
# https://github.com/docker/setup-buildx-action
|
||||||
uses: docker/setup-buildx-action@v2.2.1
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
# Login against Docker registry
|
# Login against Docker registry
|
||||||
- name: Log into registry
|
- name: Log into registry
|
||||||
# https://github.com/docker/login-action
|
# https://github.com/docker/login-action
|
||||||
uses: docker/login-action@v2.1.0
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
@@ -35,7 +35,7 @@ jobs:
|
|||||||
- name: Extract Docker metadata
|
- name: Extract Docker metadata
|
||||||
id: meta
|
id: meta
|
||||||
# https://github.com/docker/metadata-action
|
# https://github.com/docker/metadata-action
|
||||||
uses: docker/metadata-action@v4.1.1
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: docker.io/${{ secrets.DOCKERHUB_USERNAME }}/scryer-prolog
|
images: docker.io/${{ secrets.DOCKERHUB_USERNAME }}/scryer-prolog
|
||||||
tags: |
|
tags: |
|
||||||
@@ -47,7 +47,13 @@ jobs:
|
|||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
id: build-and-push
|
id: build-and-push
|
||||||
# https://github.com/docker/build-push-action
|
# https://github.com/docker/build-push-action
|
||||||
uses: docker/build-push-action@v3.2.0
|
uses: docker/build-push-action@v6
|
||||||
|
# v4 adds SLSA Provenance attestation which is
|
||||||
|
# - unsupported by AWS Lambda
|
||||||
|
# - limited support by Google Cloud Run
|
||||||
|
# > If deploying a multi-architecture image, the manifest list must include linux/amd64.
|
||||||
|
# see https://github.com/docker/build-push-action/releases/tag/v4.0.0
|
||||||
|
# we might want to disable this if its a problem for someone
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
|
|||||||
Reference in New Issue
Block a user