Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to GHCR and use more github actions #609

Merged
merged 89 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
6cfde93
switch to GHCR and use more github actions
Emilgardis Nov 18, 2021
cf0d672
fix errors
Emilgardis Nov 18, 2021
aa607bd
apply rustfmt
Emilgardis Nov 18, 2021
0d876be
fix error
Emilgardis Nov 18, 2021
591081c
fix wrong needs req
Emilgardis Nov 18, 2021
fbfa339
fix syntax and wrong reference
Emilgardis Nov 18, 2021
59ce233
fix
Emilgardis Nov 18, 2021
21eacb5
fix image for windows and uncapitalize macos
Emilgardis Nov 18, 2021
743204f
fix issues with matrix
Emilgardis Nov 18, 2021
d78f388
change order of name
Emilgardis Nov 18, 2021
1395aa4
fix envs
Emilgardis Nov 18, 2021
e40c060
fix?
Emilgardis Nov 18, 2021
1c431a9
don't run solaris images
Emilgardis Nov 19, 2021
9a821ea
print seconds run when trying to boot qemu
Emilgardis Nov 19, 2021
f3e98eb
also display qemu log | tail -n10 when failed
Emilgardis Nov 19, 2021
ace9089
disable dragonfly
Emilgardis Nov 19, 2021
64d3558
Update qemu to 5.1
malbarbo Oct 30, 2020
c8231a8
allow apt-get -d to retry
Emilgardis Nov 19, 2021
b4aa1de
always run with bash
Emilgardis Nov 19, 2021
9a601ee
libcap-ng static
Emilgardis Nov 19, 2021
6044f0e
more fixes
Emilgardis Nov 20, 2021
b24ea1d
update image name
Emilgardis Jan 24, 2022
aff472e
bump msrv
Emilgardis Jan 25, 2022
2a1a5e1
apply cargo fmt
Emilgardis Feb 6, 2022
83061d5
freebsd: Include libdevstat in build image
jszwedko Dec 29, 2021
70e6eff
freebsd: include libkvm in build image
wg Nov 23, 2021
0a5ba92
Fix FreeBSD versions of sqlite and openssl
svenstaro Feb 6, 2022
3372831
disabled asmjs-unknown-emscripten, see #634
Emilgardis Feb 6, 2022
1fb3a5b
Update emscripten version
josephlr Jan 5, 2021
86f0da4
Add missing Debian key.
reitermarkus Mar 10, 2022
56ae964
Update kernel version.
reitermarkus Mar 10, 2022
46e6dfd
Use slightly older kernel version.
reitermarkus Mar 10, 2022
5d9760f
Don't run unit tests on host for every Docker build.
reitermarkus Mar 10, 2022
f1d6d71
Run unit tests on host OSs.
reitermarkus Mar 10, 2022
c777671
Fix environment variables.
reitermarkus Mar 10, 2022
eef1ed8
Set `CROSS_DEBUG`.
reitermarkus Mar 10, 2022
7e43a6c
Build static `libblkid`.
reitermarkus Mar 10, 2022
e1097a8
Add verbose flag for copying modules.
reitermarkus Mar 10, 2022
91d81cc
Use older `qemu` version for `centos:7`.
reitermarkus Mar 11, 2022
39d9af3
Revert to `libcap2`.
reitermarkus Mar 11, 2022
848543e
Revert to `libcap-devel`.
reitermarkus Mar 11, 2022
805c6a3
Use fixed kernel version for `powerpc64`.
reitermarkus Mar 11, 2022
a80e224
Add `netfs` module.
reitermarkus Mar 11, 2022
2a8bf2c
Add `virtio_pci_modern_dev` module.
reitermarkus Mar 11, 2022
1c4fdbc
Remove need for `BRANCH` and `TAG` variables.
reitermarkus Mar 11, 2022
dba648e
Ignore missing `netfs` module.
reitermarkus Mar 11, 2022
f0cf464
Add `virtio_pci_legacy_dev` module.
reitermarkus Mar 11, 2022
e077459
Fix wrong syntax.
reitermarkus Mar 11, 2022
38949df
Fix Docker login.
reitermarkus Mar 11, 2022
cb1c0aa
Disable `wasm32-unknown-emscripten`.
reitermarkus Mar 12, 2022
20cd45b
Use Docker Buildx and GitHub Actions cache.
reitermarkus Mar 12, 2022
b2cc52c
Refactor deploy/publish variables.
reitermarkus Mar 12, 2022
30a93d8
Remove undefined `cache_args` variable.
reitermarkus Mar 12, 2022
b8f35c6
Fix `shellcheck` warning.
reitermarkus Mar 12, 2022
40506f0
Fix image name.
reitermarkus Mar 12, 2022
07e9537
Use correct image for test.
reitermarkus Mar 12, 2022
e371605
Always load image.
reitermarkus Mar 12, 2022
06842b5
Show CI result.
reitermarkus Mar 12, 2022
5674ddc
Disable `CROSS_DEBUG` and show more log lines by default.
reitermarkus Mar 12, 2022
eeba99b
Add cache args only on GitHub Actions.
reitermarkus Mar 12, 2022
d02c97c
Pass actions URL to Buildkit.
reitermarkus Mar 12, 2022
a633d55
Use shorter job name.
reitermarkus Mar 12, 2022
26bb6d6
Add skippable job to `ci` workflow.
reitermarkus Mar 12, 2022
b36916f
Add Rust cache action.
reitermarkus Mar 12, 2022
02dc2db
Split `clippy` into separate job.
reitermarkus Mar 12, 2022
d1959de
Merge `docker` workflow into `ci` workflow.
reitermarkus Mar 12, 2022
24379f7
Fix `clippy` installation.
reitermarkus Mar 12, 2022
ae0bf31
Add action for setting up Rust.
reitermarkus Mar 12, 2022
746131d
Docker job needs test.
reitermarkus Mar 12, 2022
52331f5
Add `publish` workflow.
reitermarkus Mar 12, 2022
bcced71
Read changelog for release notes.
reitermarkus Mar 12, 2022
3bf7a05
Reorder and minify build matrix.
reitermarkus Mar 12, 2022
4ed0f12
Add missing `shell`.
reitermarkus Mar 12, 2022
9dbe91a
Fix upload of `.exe` binaries.
reitermarkus Mar 12, 2022
cbf520a
Add missing `shell`.
reitermarkus Mar 12, 2022
be751d5
Fix archive path.
reitermarkus Mar 12, 2022
db71032
Update powerpc64 kernel version.
reitermarkus Mar 13, 2022
4852430
Fix `bin` directory on Windows.
reitermarkus Mar 13, 2022
4b0aedf
Fix publish action.
reitermarkus Mar 13, 2022
d600e7a
Change secret name.
reitermarkus Mar 13, 2022
c50d403
Increase login timeout.
reitermarkus Mar 13, 2022
77e9a13
Composite action does not support timeout.
reitermarkus Mar 13, 2022
89ac3e2
Remove redundant `matrix.toolchain`.
reitermarkus Mar 13, 2022
57cce26
Update default branch name.
reitermarkus Mar 13, 2022
23581aa
tag active branch as edge as well
Emilgardis Mar 13, 2022
1899b8a
document new image name
Emilgardis Mar 13, 2022
c06858b
remove stale file
Emilgardis Mar 13, 2022
5631d16
apply shellsheck fixes
Emilgardis Mar 13, 2022
fbbe7fb
Revert shellcheck fixes.
reitermarkus Mar 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .github/actions/cargo-install-upload-artifacts/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
inputs:
target:
description: 'Target'
type: string

runs:
using: composite
steps:
- name: Check if crate has binaries
id: metadata
run: |
metadata="$(cargo metadata --format-version 1 --no-deps)"

package_name="$(jq -r '.packages[0].name' <<< "${metadata}")"
has_binaries="$(jq '.packages[0].targets | any(.kind | contains(["bin"]))' <<< "${metadata}")"
echo "::set-output name=package-name::${package_name}"
echo "::set-output name=has-binaries::${has_binaries}"

out_dir="$(mktemp -d)"
artifacts_dir="$(mktemp -d)"

if which cygpath; then
out_dir="$(cygpath -w "${out_dir}")"
artifacts_dir="$(cygpath -w "${artifacts_dir}")"
fi

echo "::set-output name=out-dir::${out_dir}"
echo "::set-output name=artifacts-dir::${artifacts_dir}"
shell: bash

- name: Build with all features
if: ${{ fromJson(steps.metadata.outputs.has-binaries) }}
uses: actions-rs/cargo@v1
with:
command: install
args: >
--locked
--path .
--target ${{ inputs.target }}
--all-features
--root ${{ steps.metadata.outputs.out-dir }}
--bins
use-cross: true

- name: Archive artifacts
if: ${{ fromJson(steps.metadata.outputs.has-binaries) }}
id: archive
run: |
set -x

if which cygpath; then
out_dir="$(cygpath -u "${out_dir}")"
artifacts_dir="$(cygpath -u "${artifacts_dir}")"
fi

artifact_name="${package_name}-${target}"
artifact_path="${artifacts_dir}/${artifact_name}.tar.gz"

pushd "${out_dir}/bin"
tar -cvzf "${artifact_path}" *
popd

tar -tf "${artifact_path}"
ls -al "${artifact_path}"

if which cygpath; then
artifact_path="$(cygpath -w "${artifact_path}")"
fi

echo "::set-output name=name::${artifact_name}"
echo "::set-output name=path::${artifact_path}"
env:
package_name: ${{ steps.metadata.outputs.package-name }}
out_dir: ${{ steps.metadata.outputs.out-dir }}
artifacts_dir: ${{ steps.metadata.outputs.artifacts-dir }}
target: ${{ inputs.target }}
shell: bash

- name: Upload artifacts
if: ${{ steps.archive.outputs.path }}
uses: actions/upload-artifact@v3
with:
name: ${{ steps.archive.outputs.name }}
path: ${{ steps.archive.outputs.path }}
if-no-files-found: error
51 changes: 51 additions & 0 deletions .github/actions/cargo-publish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
inputs:
cargo-registry-token:
description: 'API token for crates.io'
type: string

runs:
using: composite
steps:
- name: Read changelog
id: changelog-reader
uses: mindsers/[email protected]
with:
validation_depth: 10
version: ${{ (github.ref_type == 'tag' && github.ref_name) || 'Unreleased' }}
path: ./CHANGELOG.md

- name: Download artifacts
id: download-artifacts
uses: actions/download-artifact@v3
with:
path:
${{ runner.temp }}/artifacts

- name: Log into crates.io
if: steps.cargo-toml-publish.outputs.value != 'false' && github.event_name != 'pull_request'
uses: actions-rs/cargo@v1
with:
command: login
args: -- ${{ inputs.cargo-registry-token }}

- name: Create GitHub release
if: >
github.event_name == 'push' && (
github.ref == format('refs/heads/{0}', github.event.repository.default_branch) ||
startsWith(github.ref, 'refs/tags/v')
)
uses: softprops/action-gh-release@v1
with:
tag: ${{ steps.changelog-reader.outputs.version }}
name: ${{ steps.changelog-reader.outputs.version }}
body: ${{ steps.changelog-reader.outputs.changes }}
prerelease: ${{ steps.changelog-reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog-reader.outputs.status == 'unreleased' }}
files: |
${{ steps.download-artifacts.outputs.download-path }}/*/*

- name: Publish crate
uses: actions-rs/cargo@v1
with:
command: publish
args: ${{ !startsWith(github.ref, 'refs/tags/v') && '--dry-run' || '' }}
25 changes: 25 additions & 0 deletions .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
inputs:
toolchain:
description: 'Toolchain'
default: 1.58.1
type: string
target:
description: 'Target'
type: string
components:
description: 'Components'
type: string

runs:
using: composite
steps:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ inputs.toolchain }}
target: ${{ inputs.target }}
default: true
components: ${{ inputs.components }}
profile: minimal

- uses: Swatinem/[email protected]
2 changes: 1 addition & 1 deletion .github/bors.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
block_labels = ["needs-decision"]
delete_merged_branches = true
required_approvals = 1
status = ["shellcheck"]
status = ["conclusion"]
timeout_sec = 21600
Loading